Move the 'deflate-on-oom' and 'free-page-reporting' before the address to simplify the genrator code. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_command.c | 8 ++------ tests/qemuxml2argvdata/balloon-ccw-deflate.args | 2 +- tests/qemuxml2argvdata/balloon-device-deflate-off.args | 2 +- tests/qemuxml2argvdata/balloon-device-deflate.args | 2 +- ...tions-memballoon-freepage-reporting.x86_64-latest.args | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9b2e2f2719..95070e4a06 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4221,18 +4221,14 @@ qemuBuildMemballoonCommandLine(virCommand *cmd, if (virJSONValueObjectAdd(props, "s:id", def->memballoon->info.alias, + "T:deflate-on-oom", def->memballoon->autodeflate, + "T:free-page-reporting", def->memballoon->free_page_reporting, NULL) < 0) return -1; if (qemuBuildDeviceAddressProps(props, def, &def->memballoon->info) < 0) return -1; - if (virJSONValueObjectAdd(props, - "T:deflate-on-oom", def->memballoon->autodeflate, - "T:free-page-reporting", def->memballoon->free_page_reporting, - NULL) < 0) - return -1; - if (qemuCommandAddExtDevice(cmd, &def->memballoon->info) < 0) return -1; diff --git a/tests/qemuxml2argvdata/balloon-ccw-deflate.args b/tests/qemuxml2argvdata/balloon-ccw-deflate.args index bf56265638..0f2a8f0a30 100644 --- a/tests/qemuxml2argvdata/balloon-ccw-deflate.args +++ b/tests/qemuxml2argvdata/balloon-ccw-deflate.args @@ -24,5 +24,5 @@ QEMU_AUDIO_DRV=none \ -rtc base=utc \ -no-shutdown \ -boot strict=on \ --device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a,deflate-on-oom=on \ +-device virtio-balloon-ccw,id=balloon0,deflate-on-oom=on,devno=fe.0.000a \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/balloon-device-deflate-off.args b/tests/qemuxml2argvdata/balloon-device-deflate-off.args index 4dba0f0e63..efe85c8194 100644 --- a/tests/qemuxml2argvdata/balloon-device-deflate-off.args +++ b/tests/qemuxml2argvdata/balloon-device-deflate-off.args @@ -28,5 +28,5 @@ QEMU_AUDIO_DRV=none \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x12,deflate-on-oom=off \ +-device virtio-balloon-pci,id=balloon0,deflate-on-oom=off,bus=pci.0,addr=0x12 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/balloon-device-deflate.args b/tests/qemuxml2argvdata/balloon-device-deflate.args index 778329f68b..ae05d0069c 100644 --- a/tests/qemuxml2argvdata/balloon-device-deflate.args +++ b/tests/qemuxml2argvdata/balloon-device-deflate.args @@ -28,5 +28,5 @@ QEMU_AUDIO_DRV=none \ -usb \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x12,deflate-on-oom=on \ +-device virtio-balloon-pci,id=balloon0,deflate-on-oom=on,bus=pci.0,addr=0x12 \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args index e3e32e4f34..e6ac1e27f2 100644 --- a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args @@ -28,6 +28,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=on \ -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ -audiodev id=audio1,driver=none \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2,free-page-reporting=on \ +-device virtio-balloon-pci,id=balloon0,free-page-reporting=on,bus=pci.0,addr=0x2 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on -- 2.31.1