On Mon, Mar 23, 2015 at 07:05:41PM +0530, Bharata B Rao wrote: > Hi, > > This is the version 2 of the patchset that provides CPU and memory hotplug > support for PowerPC sPAPR guests.
[snip] > TODOs > ----- > - Share code between pc_dimm_plug() and spapr_memory_plug(). > - Make the algorithm that looks up the NUMA node given the physical address > more efficient. > - Test/enable migration after hotplug. While I am using a bitmap based CPU enumeration (patch 14/23 in this patchset), to correctly support CPU hot removal, it appears that supporting hot removal with migration is non trivial if we allow removal in arbitrary order and not necessarily remove-last-added-cpu-first order. If there are holes in CPU index map (like 0-15,20-23) at the source VM due to hot removal, the CPU index map at the target VM will be 0-19 by default. I see there was a patch to solve somewhat similar problem on x86 last year (https://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg01607.html), but don't see it being pursued further. What would be the ideal or recommended way to solve this problem ? Easiest would be to enforce hot removal in LIFO order, but I guess that would be restrictive. Regards, Bharata.