mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
Add APIC ACCESS VMexit handler
Update 'apic_access_exit_handler()' function to emulate guest instruments to read/write guest's lapic registers page Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -125,7 +125,7 @@ uint64_t apicv_get_apic_access_addr(struct vm *vm);
|
||||
uint64_t apicv_get_apic_page_addr(struct vlapic *vlapic);
|
||||
bool vlapic_apicv_enabled(struct vcpu *vcpu);
|
||||
void apicv_inject_pir(struct vlapic *vlapic);
|
||||
int apicv_access_exit_handler(struct vcpu *vcpu);
|
||||
int apic_access_exit_handler(struct vcpu *vcpu);
|
||||
int apicv_write_exit_handler(struct vcpu *vcpu);
|
||||
int apicv_virtualized_eoi_exit_handler(struct vcpu *vcpu);
|
||||
|
||||
|
@@ -351,6 +351,20 @@
|
||||
#define VMX_INT_TYPE_HW_EXP 3
|
||||
#define VMX_INT_TYPE_SW_EXP 6
|
||||
|
||||
/*VM exit qulifications for APIC-access
|
||||
* Access type:
|
||||
* 0 = linear access for a data read during instruction execution
|
||||
* 1 = linear access for a data write during instruction execution
|
||||
* 2 = linear access for an instruction fetch
|
||||
* 3 = linear access (read or write) during event delivery
|
||||
* 10 = guest-physical access during event delivery
|
||||
* 15 = guest-physical access for an instructon fetch or during
|
||||
* instruction execution
|
||||
*/
|
||||
#define APIC_ACCESS_TYPE(qual) (((qual) >> 12) & 0xF)
|
||||
#define APIC_ACCESS_OFFSET(qual) ((qual) & 0xFFF)
|
||||
|
||||
|
||||
#define VM_SUCCESS 0
|
||||
#define VM_FAIL -1
|
||||
|
||||
|
Reference in New Issue
Block a user