We
can't just add in the hole shift value, as the hole may be at or
above
the 44-bit boundary. Instead we need to determine the total bit
count
until reaching 32 significant (not squashed out) bits in PFN
representations.
Signed-off-by:
Jan Beulich
<jbeulich@suse.com>---
a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -180,6
+180,19 @@ void dump_pageframe_info(struct domain *
spin_unlock(&d->page_alloc_lock);
}
+static unsigned
int __init noinline _domain_struct_bits(void)
+{
+ unsigned int
bits = 32 + PAGE_SHIFT;
+ unsigned int sig =
hweight32(~pfn_hole_mask);
+ unsigned int mask = pfn_hole_mask
>> 32;
+
+ for ( ; bits < BITS_PER_LONG && sig
< 32; ++bits, mask >>= 1 )
+ if ( !(mask & 1) )
+
++sig;