Hi,
This is a follow up of [1] after really comprehending what I
was messing with and what I couldn't do. This version has a
shorter scope, only pSeries guests are being taken care of.
I can send a follow up to handle x86 as well depending on the
popularity of this work.
Patches 1 and 2 moves the existing qemuDomainAlignMemorySizes()
from qemu_command.c to qemuProcessPrepareDomain(). They are
not related/tied to everything else done here and can be pushed
independently if needed.
Patches 3, 4 and 5 are reworking the existing code to be consistent
to our prerrogative of not aligning memory when migrating or
'snapshotting'. No significant behavioral change is done.
Patch 6 is where the bacon is. For new ppc64 guests, without ABI
breakage, the mem alignment that are overshooting the intended
initial memory is fixed.
Test cases were added to help me diagnose and assert what I was
changing and what would remain untouched.
[1]
https://www.redhat.com/archives/libvir-list/2020-November/msg00544.html
Daniel Henrique Barboza (6):
qemu_process.c: check migrateURI when setting
VIR_QEMU_PROCESS_START_NEW
qemu: move memory size align to qemuProcessPrepareDomain()
Revert "domain_conf.c: auto-align pSeries NVDIMM in
virDomainMemoryDefPostParse()"
qemuxml2xmltest.c: honor ARG_PARSEFLAGS
qemu_domain.c: post parse pSeries NVDIMM align with PARSE_ABI_UPDATE
qemu_domain.c: align all pSeries mem modules when PARSE_ABI_UPDATE
src/conf/domain_conf.c | 23 +--------
src/qemu/qemu_command.c | 3 --
src/qemu/qemu_domain.c | 39 ++++++++++++++-
src/qemu/qemu_process.c | 11 +++-
...memory-hotplug-nvdimm-ppc64-abi-update.xml | 50 +++++++++++++++++++
...emory-hotplug-ppc64-nonuma-abi-update.args | 34 +++++++++++++
...memory-hotplug-ppc64-nonuma-abi-update.xml | 32 ++++++++++++
tests/qemuxml2argvtest.c | 7 +++
...memory-hotplug-nvdimm-ppc64-abi-update.xml | 50 +++++++++++++++++++
.../memory-hotplug-nvdimm-ppc64.xml | 2 +-
...memory-hotplug-ppc64-nonuma-abi-update.xml | 45 +++++++++++++++++
tests/qemuxml2xmltest.c | 20 +++++++-
12 files changed, 286 insertions(+), 30 deletions(-)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.xml
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.xml
create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64-abi-update.xml
create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-ppc64-nonuma-abi-update.xml