qemuBuildMemballoonCommandLine: Reorder properties

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>
This commit is contained in:
Peter Krempa 2021-10-06 16:18:37 +02:00
parent 5626327552
commit c234430b73
5 changed files with 6 additions and 10 deletions

View 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;

View 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

View 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

View 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

View 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