29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
|
# HG changeset patch
|
||
|
# User Dongxiao Xu <dongxiao.xu@intel.com>
|
||
|
# Date 1354812866 0
|
||
|
# Node ID 312f0713dfc98635fd9ed4b42481581489faa28f
|
||
|
# Parent bfd8e96fa3f157630f9698401a1f040ca1776c8e
|
||
|
nested vmx: fix rflags status in virtual vmexit
|
||
|
|
||
|
As stated in SDM, all bits (except for those 1-reserved) in rflags
|
||
|
would be set to 0 in VM exit. Therefore we need to follow this logic
|
||
|
in virtual_vmexit.
|
||
|
|
||
|
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
|
||
|
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
||
|
Acked-by: Jan Beulich <jbeulich@suse.com>
|
||
|
Committed-by: Keir Fraser <keir@xen.org>
|
||
|
|
||
|
--- a/xen/arch/x86/hvm/vmx/vvmx.c
|
||
|
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
|
||
|
@@ -990,7 +990,8 @@ static void virtual_vmexit(struct cpu_us
|
||
|
|
||
|
regs->eip = __get_vvmcs(nvcpu->nv_vvmcx, HOST_RIP);
|
||
|
regs->esp = __get_vvmcs(nvcpu->nv_vvmcx, HOST_RSP);
|
||
|
- regs->eflags = __vmread(GUEST_RFLAGS);
|
||
|
+ /* VM exit clears all bits except bit 1 */
|
||
|
+ regs->eflags = 0x2;
|
||
|
|
||
|
/* updating host cr0 to sync TS bit */
|
||
|
__vmwrite(HOST_CR0, v->arch.hvm_vmx.host_cr0);
|