[PATCH UPDATED] x86: set PAE PHYSICAL_MASK_SHIFT to 44 bits.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Friday, June 6, 2008 - 2:21 am

When a 64-bit x86 processor runs in 32-bit PAE mode, a pte can
potentially have the same number of physical address bits as the
64-bit host ("Enhanced Legacy PAE Paging").  This means, in theory,
we could have up to 52 bits of physical address in a pte.

The 32-bit kernel uses a 32-bit unsigned long to represent a pfn.
This means that it can only represent physical addresses up to 32+12=44
bits wide.  Rather than widening pfns everywhere, just set 2^44 as the
Linux x86_32-PAE architectural limit for physical address size.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jan Beulich <jbeulich@novell.com>
---
 include/asm-x86/page_32.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

===================================================================
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -22,7 +22,8 @@
 
 
 #ifdef CONFIG_X86_PAE
-#define __PHYSICAL_MASK_SHIFT	36
+/* 44=32+12, the limit we can fit into an unsigned long pfn */
+#define __PHYSICAL_MASK_SHIFT	44
 #define __VIRTUAL_MASK_SHIFT	32
 #define PAGETABLE_LEVELS	3
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Thu Jun 5, 8:21 am)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Thu Jun 5, 8:42 am)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Thu Jun 5, 2:14 pm)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Arjan van de Ven, (Thu Jun 5, 9:45 pm)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Fri Jun 6, 12:59 am)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Fri Jun 6, 1:08 am)
Re: [PATCH] x86: set PAE PHYSICAL_MASK_SHIFT to match 64-bit, Jeremy Fitzhardinge, (Fri Jun 6, 1:15 am)
[PATCH UPDATED] x86: set PAE PHYSICAL_MASK_SHIFT to 44 bits., Jeremy Fitzhardinge, (Fri Jun 6, 2:21 am)
Re: [PATCH UPDATED] x86: set PAE PHYSICAL_MASK_SHIFT to 44 ..., Jeremy Fitzhardinge, (Fri Jun 6, 6:50 am)
Re: [PATCH UPDATED] x86: set PAE PHYSICAL_MASK_SHIFT to 44 ..., Jeremy Fitzhardinge, (Tue Jun 10, 6:06 am)