All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@suse.de>
To: xen-devel@lists.xensource.com
Subject: [patch] pae >4gb fix #1
Date: Fri, 5 Aug 2005 16:13:07 +0200	[thread overview]
Message-ID: <20050805141307.GA17032@bytesex> (raw)

  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++ )
     {

                 reply	other threads:[~2005-08-05 14:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050805141307.GA17032@bytesex \
    --to=kraxel@suse.de \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.