mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-09 00:46:57 +00:00
For platforms that do not support XSAVES/XRSTORS instructions, like QEMU, executing these instructions causes #UD. This patch adds the check before the execution of XSAVES/XRSTORS instructions. It also refines the logic inside rstore_xsave_area for the following reason: If XSAVES/XRSTORS instructions are supported, restore XSAVE area if any of the following conditions is met: 1. "vcpu->launched" is false (state initialization for guest) 2. "vcpu->arch.xsave_enabled" is true (state restoring for guest) * Before vCPU is launched, condition 1 is satisfied. * After vCPU is launched, condition 2 is satisfied because is_valid_xsave_combination() guarantees that "vcpu->arch.xsave_enabled" is consistent with pcpu_has_cap(X86_FEATURE_XSAVES). Therefore, the check against "vcpu->launched" and "vcpu->arch.xsave_enabled" can be eliminated here. Tracked-On: #6481 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com> |
||
---|---|---|
.. | ||
assign.c | ||
ept.c | ||
guest_memory.c | ||
hyperv.c | ||
instr_emul.c | ||
lock_instr_emul.c | ||
nested.c | ||
pm.c | ||
trusty.c | ||
ucode.c | ||
vcpu.c | ||
vcpuid.c | ||
ve820.c | ||
vept.c | ||
virq.c | ||
virtual_cr.c | ||
vlapic_priv.h | ||
vlapic.c | ||
vm_reset.c | ||
vm.c | ||
vmcall.c | ||
vmcs.c | ||
vmexit.c | ||
vmsr.c | ||
vmtrr.c | ||
vmx_asm.S | ||
vmx_io.c |