diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9f40276d6405ee01c942f4aecc56cec9497369c6..7d92f3a54478bbfa93899a14c11bd6f305a92c30 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3362,8 +3362,13 @@ qemuDomainAgentAvailable(virDomainObjPtr vm, static unsigned long long -qemuDomainGetMemorySizeAlignment(virDomainDefPtr def ATTRIBUTE_UNUSED) +qemuDomainGetMemorySizeAlignment(virDomainDefPtr def) { + /* PPC requires the memory sizes to be rounded to 256MiB increments, so + * round them to the size always. */ + if (ARCH_IS_PPC64(def->os.arch)) + return 256 * 1024; + /* Align memory size. QEMU requires rounding to next 4KiB block. * We'll take the "traditional" path and round it to 1MiB*/ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args index 64df406e1d4ca1b7dcc360511527a04254314af4..305e92438182f9edbe1a87325a7f4fee28b8dd0f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-compat.args @@ -1,7 +1,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ QEMU_AUDIO_DRV=none /usr/bin/qemu-system-ppc64 -S -M pseries \ -cpu host,compat=power7 \ --m 214 -smp 4 -nographic -nodefconfig -nodefaults \ +-m 256 -smp 4 -nographic -nodefconfig -nodefaults \ -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ -chardev pty,id=charserial0 \