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-3.2-testing] 32-on-64: Fix physaddr_bitsize computa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] 32-on-64: Fix physaddr_bitsize computation when creating a 32b x86
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 05 Jun 2008 09:30:28 -0700
Delivery-date: Thu, 05 Jun 2008 09:30:25 -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.fraser@xxxxxxxxxx>
# Date 1212659454 -3600
# Node ID 6c60d618b889353e875199d8128185014082b389
# Parent  ca3ebd5b04d327b623b6c8ac1d1e9ed31093f974
32-on-64: Fix physaddr_bitsize computation when creating a 32b x86
compat domain.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17783:31a941632a5db6ea91325a13d875e714918ac428
xen-unstable date:        Thu Jun 05 10:47:08 2008 +0100
---
 xen/arch/x86/domain.c       |    6 ++++--
 xen/arch/x86/domain_build.c |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff -r ca3ebd5b04d3 -r 6c60d618b889 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Mon Jun 02 10:59:29 2008 +0100
+++ b/xen/arch/x86/domain.c     Thu Jun 05 10:50:54 2008 +0100
@@ -347,8 +347,10 @@ int switch_compat(struct domain *d)
     }
 
     d->arch.physaddr_bitsize =
-        fls((1UL << 32) - HYPERVISOR_COMPAT_VIRT_START(d)) - 1
-        + (PAGE_SIZE - 2);
+        /* 2^n entries can be contained in guest's p2m mapping space */
+        fls((1UL << 32) - HYPERVISOR_COMPAT_VIRT_START(d)) - 3
+        /* 2^n pages -> 2^(n+PAGE_SHIFT) bits */
+        + PAGE_SHIFT;
 
     return 0;
 
diff -r ca3ebd5b04d3 -r 6c60d618b889 xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Mon Jun 02 10:59:29 2008 +0100
+++ b/xen/arch/x86/domain_build.c       Thu Jun 05 10:50:54 2008 +0100
@@ -365,8 +365,10 @@ int __init construct_dom0(
 #if defined(__x86_64__)
     if ( is_pv_32on64_domain(d) )
         d->arch.physaddr_bitsize =
-            fls((1UL << 32) - HYPERVISOR_COMPAT_VIRT_START(d)) - 1
-            + (PAGE_SIZE - 2);
+            /* 2^n entries can be contained in guest's p2m mapping space */
+            fls((1UL << 32) - HYPERVISOR_COMPAT_VIRT_START(d)) - 3
+            /* 2^n pages -> 2^(n+PAGE_SHIFT) bits */
+            + PAGE_SHIFT;
 #endif
 
     /*

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] 32-on-64: Fix physaddr_bitsize computation when creating a 32b x86, Xen patchbot-3.2-testing <=