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

[Xen-changelog] [xen-4.2-testing] x86/nested-svm: Update the paging mode on VMRUN and VMEXIT emulation.


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

# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1349434527 -7200
# Node ID 27db446078b50d576d8425d36daf52f886b710e6
# Parent  a69c8e5c4afcc5a116ec9d3953db425197dc028c
x86/nested-svm: Update the paging mode on VMRUN and VMEXIT emulation.

This allows Xen to walk the l1 hypervisor's shadow pagetable
correctly.  Not needed for hap-on-hap guests because they are handled
at lookup time.  Problem found with 64bit Win7 and 32bit XPMode where Win7
switches forth and back between long mode and PAE legacy pagetables.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
[Adjusted to update in all cases where the l1 vmm uses shadows]
Signed-off-by: Tim Deegan <tim@xxxxxxx>
xen-unstable changeset: 25984:a9c84069c248
xen-unstable date: Thu Oct  4 13:20:50 UTC 2012
---


diff -r a69c8e5c4afc -r 27db446078b5 xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c  Thu Oct 04 10:16:20 2012 +0200
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c  Fri Oct 05 12:55:27 2012 +0200
@@ -741,6 +741,10 @@ nsvm_vcpu_vmrun(struct vcpu *v, struct c
         return 1;
     }
 
+    /* If l1 guest uses shadow paging, update the paging mode. */
+    if (!nestedhvm_paging_mode_hap(v))
+        paging_update_paging_modes(v);
+
     nv->nv_vmswitch_in_progress = 0;
     return 0;
 }
@@ -1408,6 +1412,10 @@ nestedsvm_vcpu_vmexit(struct vcpu *v, st
      */
     rc = nhvm_vcpu_vmexit(v, regs, exitcode);
 
+    /* If l1 guest uses shadow paging, update the paging mode. */
+    if (!nestedhvm_paging_mode_hap(v))
+        paging_update_paging_modes(v);
+
     nv->nv_vmswitch_in_progress = 0;
 
     if (rc)

_______________________________________________
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®.