]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildMemballoonCommandLine: Reorder properties
authorPeter Krempa <pkrempa@redhat.com>
Wed, 6 Oct 2021 14:18:37 +0000 (16:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Oct 2021 08:26:03 +0000 (10:26 +0200)
Move the 'deflate-on-oom' and 'free-page-reporting' before the address
to simplify the genrator code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/balloon-ccw-deflate.args
tests/qemuxml2argvdata/balloon-device-deflate-off.args
tests/qemuxml2argvdata/balloon-device-deflate.args
tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args

index d7dcdcf008601d3d062fc6f43a18c618ec572eed..1befeef9e3f078b26b3976dab132cfc5793f9cf5 100644 (file)
@@ -4231,18 +4231,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;
 
index bf56265638542f980a41482aab7e82742c1de2df..0f2a8f0a30a56483ded8641815a088ff6bc2189a 100644 (file)
@@ -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
index 4dba0f0e637fc2c883c7ec98492a68e3788816ad..efe85c8194d41af133497478d0ab6c49b2f51534 100644 (file)
@@ -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
index 778329f68ba60ba1adc845978db7cc684d4afd94..ae05d0069c439b32401acfa94d2f84dab14d75ad 100644 (file)
@@ -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
index e3e32e4f34e0f346eb5645858215aa5ad18de462..e6ac1e27f2dc3712b0a4b7fe1bd1e6f587abee28 100644 (file)
@@ -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