Hi, After talking with the PowerPC folks about it, specially Shiva (CCed), I had a change of heart about the changes I'm proposing here. The reasons are: - DIMM align up for ppc64 guests can lead to funny situations like a 100MiB hotplug being rounded up to 256MiB, but in reality PowerPC users are hotplugging several gigabytes of RAM per DIMM and the align up of 256MiB is of no consequence. But removing the align up and erroring out, like I'm proposing here, will most likely annoy the existing users with technical details they are not used to and, arguably, shouldn't care. - This initiative was due to the findings of bug [1], which compared the results of a unaligned PowePC hotplug (512+1 MiB being succesfully hotplugged as 3*256MiB) versus a x86 scenario (256+1 MiB erroring out in QEMU). This is happening because QEMU was expecting a 2MiB alignment **in that scenario**. Shiva mentioned that x86 isn't standardized, with each operational system operating with different alignments, and there is no universal answer for dimm alignment like PowerPC has. That all said, I will ask you to disregard this series as a whole. I have no intentions to deteriorate PowerPC user experience with something that will do more harm than good for their actual usage. At the same time, although I boldly claimed that Libvirt was considering a wrong x86 alignment value, I am not so sure anymore after learning that x86 works with several memory block sizes. This is something that I'll leave for the x86 folks to decide if it's worth looking at or not. Thanks, DHB [1] https://bugzilla.redhat.com/show_bug.cgi?id=1780506 On 2/29/20 2:51 PM, Daniel Henrique Barboza wrote:
This series fixes bug [1]. See patch 2 for details. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1780506 Daniel Henrique Barboza (3): qemu_domain.c: make qemuDomainGetMemoryModuleSizeAlignment() public qemu_hotplug.c: remove dimm auto-align on hotplug/unplug qemu_domain.c: remove qemuDomainMemoryDeviceAlignSize() src/qemu/qemu_domain.c | 23 +++-------------------- src/qemu/qemu_domain.h | 4 ++-- src/qemu/qemu_hotplug.c | 23 +++++++++++++++++++++-- 3 files changed, 26 insertions(+), 24 deletions(-)