diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-02-11 10:41:45 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-02-11 10:41:45 +0000 |
commit | 4ce68a9d48e056692bf7f7f474af9b9edc5120ac (patch) | |
tree | b1d765dda4bce52c6fd27fc13a27f0ac697a2137 | |
parent | e16fc5ba591cd0d8179193b020079dcc25f3d4c9 (diff) | |
download | xen-4ce68a9d48e056692bf7f7f474af9b9edc5120ac.tar.gz xen-4ce68a9d48e056692bf7f7f474af9b9edc5120ac.tar.bz2 xen-4ce68a9d48e056692bf7f7f474af9b9edc5120ac.zip |
x86_64: Ensure enough space for allocator bitmap after relocated Xen image.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r-- | xen/arch/x86/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 6fbe1e4e4a..996b52828a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -642,7 +642,8 @@ void __init __start_xen(unsigned long mbi_p) s >> PAGE_SHIFT, (e-s) >> PAGE_SHIFT, PAGE_HYPERVISOR); #if defined(CONFIG_X86_64) -#define reloc_size ((__pa(&_end) + mask) & ~mask) +/* Relocate Xen image, allocation bitmap, and one page of padding. */ +#define reloc_size ((__pa(&_end) + max_page/8 + PAGE_SIZE + mask) & ~mask) /* Is the region suitable for relocating Xen? */ if ( !xen_phys_start && ((e-s) >= reloc_size) ) { |