
I have tested your series with our qemu memory hot remove patch series, here would be a possible error.
When hotplug a memory device, its size has been aligned. So the compare for size here would fail possiblely.
hmm.. Not sure that's necessary - although Peter can make the final determination... Commit id '57b215a' doesn't modify each def->mems[i] entry in qemuDomainAlignMemorySizes, rather it gets a value from virDomainDefSetMemoryInitial and then does the rounding.
If the stored def->mems[i]->size value is/was modified, then I'd agree, but it doesn't appear to be that way.
If there is a rounding of the value - then please just point it out
Yes, the stored def->mems[i]->size value was modified. If you assign the size 524287 KiB, the stored value will be 524288.
Thanks, Zhu
Ah - found it - patch 9 has: + /* Align memory module sizes */ + for (i = 0; i < def->nmems; i++) + qemuDomainMemoryDeviceAlignSize(def->mems[i]); + Which I missed on my first foray through this. Once I cscope'd on VIR_ROUND_UP() instead of ->size, it became apparent So yes, it seems the to be compared size needs a likewise adjustment. John