aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/x86_64
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-09-22 08:18:19 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-09-22 08:18:19 +0100
commit73f0173619a0017225fc185ed1a96a1a47a8a0c3 (patch)
tree1945ed1c64da29298248b7aa3e6fcaf2a1dafa54 /xen/include/asm-x86/x86_64
parentbac2000063ba239d33b631f6edda48cc6b57425b (diff)
downloadxen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.tar.gz
xen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.tar.bz2
xen-73f0173619a0017225fc185ed1a96a1a47a8a0c3.zip
x86: map frame table sparsely
Avoid backing frame table holes with memory, when those holes are large enough to cover an exact multiple of large pages. This is based on the introduction of a bit map, where each bit represents one such range, thus allowing mfn_valid() checks to easily filter out those MFNs that now shouldn't be used to index the frame table. This allows for saving a couple of 2M pages even on "normal" systems. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/x86_64')
-rw-r--r--xen/include/asm-x86/x86_64/page.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/include/asm-x86/x86_64/page.h
index 8bdf9b7365..78a79c59e3 100644
--- a/xen/include/asm-x86/x86_64/page.h
+++ b/xen/include/asm-x86/x86_64/page.h
@@ -35,7 +35,7 @@
/* Physical address where Xen was relocated to. */
extern unsigned long xen_phys_start;
-extern unsigned long max_page, max_pdx;
+extern unsigned long max_pdx;
extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
extern unsigned int pfn_pdx_hole_shift;
extern unsigned long pfn_hole_mask;
@@ -53,10 +53,7 @@ extern void pfn_pdx_hole_setup(unsigned long);
#define pdx_to_virt(pdx) ((void *)(DIRECTMAP_VIRT_START + \
((unsigned long)(pdx) << PAGE_SHIFT)))
-static inline int __mfn_valid(unsigned long mfn)
-{
- return mfn < max_page && !(mfn & pfn_hole_mask);
-}
+extern int __mfn_valid(unsigned long mfn);
static inline unsigned long pfn_to_pdx(unsigned long pfn)
{