WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] svm: Enable nested paging only on x86/64.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] svm: Enable nested paging only on x86/64.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Oct 2007 17:41:39 -0700
Delivery-date: Thu, 04 Oct 2007 18:28:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1191486978 -3600
# Node ID c632def5f69b350b967c5f03250d25919c6a15ea
# Parent  ca1085e8ab82d33bffb01a1a0fa9d507bbcff5f1
svm: Enable nested paging only on x86/64.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff -r ca1085e8ab82 -r c632def5f69b xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Wed Oct 03 16:33:23 2007 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu Oct 04 09:36:18 2007 +0100
@@ -885,16 +885,6 @@ static struct hvm_function_table svm_fun
     .event_pending        = svm_event_pending
 };
 
-static int svm_npt_detect(void)
-{
-    u32 eax, ebx, ecx, edx;
-
-    /* Check CPUID for nested paging support. */
-    cpuid(0x8000000A, &eax, &ebx, &ecx, &edx);
-
-    return (edx & 1);
-}
-
 int start_svm(struct cpuinfo_x86 *c)
 {
     u32 eax, ecx, edx;
@@ -937,7 +927,14 @@ int start_svm(struct cpuinfo_x86 *c)
 
     setup_vmcb_dump();
 
-    svm_function_table.hap_supported = svm_npt_detect();
+#ifdef __x86_64__
+    /*
+     * Check CPUID for nested paging support. We support NPT only on 64-bit
+     * hosts since the phys-to-machine table is in host format. Hence 32-bit
+     * Xen could only support guests using NPT with up to a 4GB memory map.
+     */
+    svm_function_table.hap_supported = (cpuid_edx(0x8000000A) & 1);
+#endif
 
     hvm_enable(&svm_function_table);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] svm: Enable nested paging only on x86/64., Xen patchbot-unstable <=