Interface guest_vcpu_fault.h

The arm guest vcpu fault interface provides a module for registering and processing vcpu faults. The module can be used such that it directly hooks into an ARM VMMs unhandled vcpu callback interface or wrapped over by another driver. This module particularly provides useful handlers to vcpu faults relating to SMC and MSR/MRS instructions.

Brief content:


vmm_handle_arm_vcpu_exception(vcpu, hsr, cookie)

register_arm_vcpu_exception_handler(ec_class, exception_handler)


The interface guest_vcpu_fault.h defines the following functions.

Handle a vcpu exception given the HSR value - Syndrome information


  • vcpu {vm_vcpu_t *}: A handle to the faulting VCPU
  • hsr {uint32_t }: Syndrome information value describing the exception/fault
  • cookie {void *}: User supplied cookie to pass onto exception


  • -1 on error, otherwise 0 for success

Back to interface description.

Function register_arm_vcpu_exception_handler(ec_class, exception_handler)

Register a handler to a vcpu exception class


  • ec_class {uint32_t}: The exception class the handler will be called on
  • exception_handler {vcpu_exception_handler_fn}: Function pointer to the exception handler


No return

Back to interface description.

Back to top.