aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/svm
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2012-10-04 14:20:50 +0100
committerTim Deegan <tim@xen.org>2012-10-04 14:20:50 +0100
commitbf2761690b46d06c50c6ad2cfb28e1116c7ed4c3 (patch)
treed731d65ce90a784d3b338b735f9db2f74e30e257 /xen/arch/x86/hvm/svm
parentfb0c65ba0dc5fcf7582aef335565de3ae5771fda (diff)
downloadxen-bf2761690b46d06c50c6ad2cfb28e1116c7ed4c3.tar.gz
xen-bf2761690b46d06c50c6ad2cfb28e1116c7ed4c3.tar.bz2
xen-bf2761690b46d06c50c6ad2cfb28e1116c7ed4c3.zip
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@amd.com> [Adjusted to update in all cases where the l1 vmm uses shadows] Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/svm')
-rw-r--r--xen/arch/x86/hvm/svm/nestedsvm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index b56f92e3d3..9f69bcc70f 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -741,6 +741,10 @@ nsvm_vcpu_vmrun(struct vcpu *v, struct cpu_user_regs *regs)
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, struct cpu_user_regs *regs,
*/
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)