[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.2-testing] nested vmx: fix rflags status in virtual vmexit


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.2-testing <patchbot@xxxxxxx>
  • Date: Thu, 20 Dec 2012 04:33:09 +0000
  • Delivery-date: Thu, 20 Dec 2012 04:33:18 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
# Date 1355918077 -3600
# Node ID 0fb41420450f583e522a4bf22d3259c5fbd28943
# Parent  b533c473029ff99f0f130da758134acaec4f97d4
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@xxxxxxxxx>
Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
xen-unstable changeset: 26252:312f0713dfc9
xen-unstable date: Thu Dec  6 16:54:26 UTC 2012
---


diff -r b533c473029f -r 0fb41420450f xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c       Wed Dec 19 12:53:13 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c       Wed Dec 19 12:54:37 2012 +0100
@@ -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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.