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] Fix mach2phys table allocation for 32-bit PAE Xen.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix mach2phys table allocation for 32-bit PAE Xen.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Aug 2005 11:10:10 -0400
Delivery-date: Fri, 05 Aug 2005 15:10:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 69b7c9c3a9fdf22d840132f274f3fa64101a0ed0
# Parent  b63577ff53a3161ac73b55e0aa87803e76c8bde5
Fix mach2phys table allocation for 32-bit PAE Xen.
Found by Gerd Knorr.

diff -r b63577ff53a3 -r 69b7c9c3a9fd xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  Fri Aug  5 14:57:43 2005
+++ b/xen/arch/x86/x86_32/mm.c  Fri Aug  5 15:11:46 2005
@@ -98,8 +98,10 @@
      * installed, but at least 4MB to cover 4GB address space.  This is needed 
      * to make PCI I/O memory address lookups work in guests.
      */
-    if ( (mpt_size = max_page * 4) < (4*1024*1024) )
-        mpt_size = 4*1024*1024;
+    mpt_size  = (max_page * 4) + (1UL << L2_PAGETABLE_SHIFT) - 1UL;
+    mpt_size &= ~((1UL << L2_PAGETABLE_SHIFT) - 1UL);
+    if ( mpt_size < (4 << 20) )
+        mpt_size = 4 << 20;
     for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
     {
         if ( (pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0)) == NULL )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix mach2phys table allocation for 32-bit PAE Xen., Xen patchbot -unstable <=