acrn-hypervisor/hypervisor/arch/x86/guest
Junming Liu 56eb859ea4 hv: vmexit: refine xsetbv_vmexit_handler API
From SDM Vol.2C - XSETBV instruction description,
If CR4.OSXSAVE[bit 18] = 0,
execute "XSETBV" instruction will generate #UD exception.

From SDM Vol.3C 25.1.1,#UD exception has priority over VM exits,
So if vCPU execute "XSETBV" instruction when CR4.OSXSAVE[bit 18] = 0,
VM exits won't happen.

While hv inject #GP if vCPU execute "XSETBV" instruction
when CR4.OSXSAVE[bit 18] = 0.
It's a wrong behavior, this patch will fix the bug.

Tracked-On: #4020

Signed-off-by: Junming Liu <junming.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-11-26 12:56:28 +08:00
..
assign.c hv: refine msi interrupt injection functions 2020-10-26 08:44:13 +08:00
ept.c hv: skip pSRAM for guest WBINVD emulation 2020-11-02 10:29:43 +08:00
guest_memory.c gpa2hva: add INVAVLID_HPA return value check 2020-05-06 11:29:30 +08:00
hyperv.c hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
instr_emul.c hv: instr_emul: use cs segment when fetching instructions 2019-11-11 13:55:24 +08:00
pm.c hv: pm: avoid duplicate shutdowns on RTVM 2020-11-11 14:05:39 +08:00
trusty.c hv: Disable XSAVE-managed CET state of guest VM 2020-07-23 20:15:57 +08:00
ucode.c remove spin lock for micro code update 2020-06-19 16:13:20 +08:00
vcpu.c hv: Disable XSAVE-managed CET state of guest VM 2020-07-23 20:15:57 +08:00
vcpuid.c hv: Hide CET feature from guest VM 2020-07-23 20:15:57 +08:00
ve820.c hv: pSRAM: add pSRAM support for pre-launched RTVM 2020-11-02 15:56:30 +08:00
virq.c hv: pause all other vCPUs in same VM when do wbinvd emulation 2020-05-21 15:21:29 +08:00
virtual_cr.c hv: vcr: remove wbinvd for CR0.CD emulation 2020-11-02 10:29:43 +08:00
vlapic_priv.h hv: add ops to vlapic structure 2019-07-19 16:47:06 +08:00
vlapic.c hv: refine msi interrupt injection functions 2020-10-26 08:44:13 +08:00
vm_reset.c hv: pm: avoid duplicate shutdowns on RTVM 2020-11-11 14:05:39 +08:00
vm.c hv: pm: avoid duplicate shutdowns on RTVM 2020-11-11 14:05:39 +08:00
vmcall.c hv: add new hypercalls to create and destroy an emulated device in hypervisor 2020-08-28 16:53:12 +08:00
vmcs.c hv: remove unnecessary debug symbols 2020-06-18 14:05:56 +08:00
vmexit.c hv: vmexit: refine xsetbv_vmexit_handler API 2020-11-26 12:56:28 +08:00
vmsr.c hv:cpu-caps:refine is_apl_platform func and clean up duplicated code 2020-08-14 10:08:50 +08:00
vmtrr.c hv: vmtrr: remove vcpu structure pointer from vmtrr 2020-03-31 10:57:47 +08:00
vmx_asm.S hv:remove some unnecessary includes 2019-05-07 09:10:13 +08:00
vmx_io.c hv: rename BOOT_CPU_ID to BSP_CPU_ID 2020-02-25 09:08:14 +08:00