0e9e131edf
25242-x86_64-hotplug-compat-m2p.patch 25247-SVM-no-rdtsc-intercept.patch 25267-x86-text-unlikely.patch 25269-x86-vMCE-addr-misc-write.patch 25271-x86_64-IST-index.patch 25327-pvdrv-no-asm-system-h.patch - Upstream patches from Jan 25168-x86-memset-size.patch 25191-x86-tdt-delta-calculation.patch 25195-x86-cpuidle-C2-no-flush-or-bm-check.patch 25196-x86-HAP-PAT-sr.patch 25200-x86_64-trap-bounce-flags.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=189
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
# HG changeset patch
|
|
# User Malcolm Crossley <malcolm.crossley@citrix.com>
|
|
# Date 1335350156 -7200
|
|
# Node ID b7ce6a88bebbbd8d03fe50099ede8de4d9adef0f
|
|
# Parent 15f094c85c85fb769f72a48b9c5d924a8e455855
|
|
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>
|
|
|
|
--- a/xen/arch/x86/x86_64/mm.c
|
|
+++ b/xen/arch/x86/x86_64/mm.c
|
|
@@ -451,7 +451,7 @@ static int setup_compat_m2p_table(struct
|
|
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 )) &
|