diff options
author | Malcolm Crossley <malcolm.crossley@citrix.com> | 2012-05-01 14:16:31 +0100 |
---|---|---|
committer | Malcolm Crossley <malcolm.crossley@citrix.com> | 2012-05-01 14:16:31 +0100 |
commit | b8d623e62afdf7d9ecfe98659dc9d004f983c6f8 (patch) | |
tree | b2cb8f594b44bb8a31a76f9685b42bce9a4f113b | |
parent | 6d11c3e057ea44e49d48ff05df2ce64551f89bb0 (diff) | |
download | xen-b8d623e62afdf7d9ecfe98659dc9d004f983c6f8.tar.gz xen-b8d623e62afdf7d9ecfe98659dc9d004f983c6f8.tar.bz2 xen-b8d623e62afdf7d9ecfe98659dc9d004f983c6f8.zip |
x86-64: Fix memory hotplug epfn upper limit test for updating the
compat M2P table
The epfn is being compared to (RDWR_COMPAT_MPT_VIRT_END -
RDWR_COMPAT_MPT_VIRT_START) without a 2 bit shift, resulting in the
epfn being compared to the size of the RDWR_COMPAT_MPT table in bytes
instead of the maximum page frame number that the RDWR_COMPAT_MPT
table can map.
Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset: 25242:b7ce6a88bebb
xen-unstable date: Wed Apr 25 12:35:56 2012 +0200
-rw-r--r-- | xen/arch/x86/x86_64/mm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index b980d62287..862f79e2ef 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -446,7 +446,7 @@ static int setup_compat_m2p_table(struct mem_hotadd_info *info) if ((smap > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2)) ) return 0; - if (epfn > (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START)) + if ( epfn > ((RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2) ) epfn = (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) >> 2; emap = ( (epfn + ((1UL << (L2_PAGETABLE_SHIFT - 2)) - 1 )) & |