|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] [RFC] xen: Fix memory hotplug end limit test for updating compat M2P table
On 24/04/12 08:21, Jan Beulich wrote: On 23.04.12 at 20:07, Malcolm Crossley<malcolm.crossley@xxxxxxxxxx> wrote:The memory hotplug code was masking the hotplugged memory start address and comparing to a shifted version of COMPAT MPT size but not doing the same for the end address. This patch applies the same shifting and masking to the end address and reapplies the mask if the end address has been clamped. I didn't include a signed off by because it's an RFC patch and I wasn't completely sure the change was required. I kept the code style of the existing code around the patch but I will update it to Xen coding style in the future and it was my mistake for using hard tabs and my editor has been reconfigured so it won't happen in the future. The key fix is the patch is that epfn is being compared to (RDWR_COMPAT_MPT_VIRT_END - RDWR_COMPAT_MPT_VIRT_START) without a 2 bit shift. This means that epfn is being compared to the size of the RDWR_COMPAT_MPT table instead of the maximum number of entries the RDWR_COMPAT_MPT table can contain. This could result in the end regions of hotplugged memory being inaccessible when using the RDWR_COMPAT_MPT table. I also moved the epfn masking to occur before the comparison to RDWR_COMPAT_MPT to be consistent with the spfn comparison code. I can split the patch for to make the changes clearer if you want? Malcolm
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |