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-devel

[Xen-devel] [patch] pae >4gb fix #1

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] pae >4gb fix #1
From: Gerd Knorr <kraxel@xxxxxxx>
Date: Fri, 5 Aug 2005 16:13:07 +0200
Delivery-date: Fri, 05 Aug 2005 14:13:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
  Hi,

mpt size calculation is wrong, we don't allocate enougth 2MB
pages and pagefault in the memset which clears the mpt.

  Gerd

--- xen/arch/x86/x86_32/mm.c.pae        2005-08-05 15:39:23.000000000 +0200
+++ xen/arch/x86/x86_32/mm.c    2005-08-05 16:05:39.115794436 +0200
@@ -98,7 +98,9 @@
      * 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) )
+#define L2_MASK ((1<<L2_PAGETABLE_SHIFT)-1)
+    mpt_size = (max_page * 4 + L2_MASK) & ~L2_MASK;
+    if (mpt_size < 4*1024*1024)
         mpt_size = 4*1024*1024;
     for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
     {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] pae >4gb fix #1, Gerd Knorr <=