From: Christoph Egger <Christoph.Egger@amd.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: [PATCH] nestedsvm: fix paging mode
Date: Fri, 21 Sep 2012 16:01:31 +0200 [thread overview]
Message-ID: <505C733B.50205@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
On VMRUN and VMEXIT emulation update the paging mode
for Shadow-on-Nested. This allows Xen to walk the
l1 hypervisors shadow page table correctly.
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>
P.S.: Please apply this patch to xen-4.2-testing as well.
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_nh_paging.diff --]
[-- Type: text/plain, Size: 969 bytes --]
diff -r ef514a30fd70 xen/arch/x86/hvm/svm/nestedsvm.c
--- a/xen/arch/x86/hvm/svm/nestedsvm.c Fri Sep 21 13:25:22 2012 +0200
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c Fri Sep 21 14:44:13 2012 +0200
@@ -745,6 +745,11 @@ nsvm_vcpu_vmrun(struct vcpu *v, struct c
return 1;
}
+ /* If we use nested paging and l1 guest uses shadow paging ... */
+ if (paging_mode_hap(v->domain) && !nestedhvm_paging_mode_hap(v))
+ /* ... update the paging modes. */
+ paging_update_paging_modes(v);
+
nv->nv_vmswitch_in_progress = 0;
return 0;
}
@@ -1412,6 +1417,11 @@ nestedsvm_vcpu_vmexit(struct vcpu *v, st
*/
rc = nhvm_vcpu_vmexit(v, regs, exitcode);
+ /* If we use nested paging and l1 guest uses shadow paging ... */
+ if (paging_mode_hap(v->domain) && !nestedhvm_paging_mode_hap(v))
+ /* ... update the paging modes. */
+ paging_update_paging_modes(v);
+
nv->nv_vmswitch_in_progress = 0;
if (rc)
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2012-09-21 14:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 14:01 Christoph Egger [this message]
2012-09-27 14:53 ` [PATCH] nestedsvm: fix paging mode Tim Deegan
2012-10-01 13:50 ` Christoph Egger
2012-10-04 10:37 ` Tim Deegan
2012-10-04 12:14 ` Christoph Egger
2012-10-04 13:23 ` Tim Deegan
2012-10-05 9:07 ` Christoph Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505C733B.50205@amd.com \
--to=christoph.egger@amd.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).