acrn-hypervisor/hypervisor/arch/x86/guest
Shuo A Liu 3fffa68665 hv: Support WAITPKG instructions in guest VM
TPAUSE, UMONITOR or UMWAIT instructions execution in guest VM cause
a #UD if "enable user wait and pause" (bit 26) of VMX_PROCBASED_CTLS2
is not set. To fix this issue, set the bit 26 of VMX_PROCBASED_CTLS2.

Besides, these WAITPKG instructions uses MSR_IA32_UMWAIT_CONTROL. So
load corresponding vMSR value during context switch in of a vCPU.

Please note, the TPAUSE or UMWAIT instruction causes a VM exit if the
"RDTSC exiting" and "enable user wait and pause" are both 1. In ACRN
hypervisor, "RDTSC exiting" is always 0. So TPAUSE or UMWAIT doesn't
cause a VM exit.

Performance impact:
    MSR_IA32_UMWAIT_CONTROL read costs ~19 cycles;
    MSR_IA32_UMWAIT_CONTROL write costs ~63 cycles.

Tracked-On: #6006
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-05-13 14:19:50 +08:00
..
assign.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
ept.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
guest_memory.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
hyperv.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
instr_emul.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
pm.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
splitlock.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
trusty.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
ucode.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vcpu.c hv: Support WAITPKG instructions in guest VM 2021-05-13 14:19:50 +08:00
vcpuid.c hv: some coding style fixes 2021-05-12 16:50:34 +08:00
ve820.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
virq.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
virtual_cr.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vlapic_priv.h hv: add ops to vlapic structure 2019-07-19 16:47:06 +08:00
vlapic.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vm_reset.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vm.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vmcall.c hv: hypercalls: refactor permission-checking and dispatching logic 2021-05-12 13:43:41 +08:00
vmcs.c hv: Support WAITPKG instructions in guest VM 2021-05-13 14:19:50 +08:00
vmexit.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vmsr.c hv: Support WAITPKG instructions in guest VM 2021-05-13 14:19:50 +08:00
vmtrr.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vmx_asm.S hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
vmx_io.c hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00