]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildHostdevMediatedDevProps: Move 'ramfb' and 'bootindex' before the address
authorPeter Krempa <pkrempa@redhat.com>
Wed, 6 Oct 2021 14:36:41 +0000 (16:36 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Oct 2021 08:26:03 +0000 (10:26 +0200)
Simplify the generator by moving few properties earlier.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/hostdev-mdev-display-ramfb.x86_64-latest.args
tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args

index 8fab9fac235806b6076d6f6592fb9f4f63de5830..de10043059c62c5c2e10300a4e99bf93e506190e 100644 (file)
@@ -5363,18 +5363,14 @@ qemuBuildHostdevMediatedDevProps(const virDomainDef *def,
                                  "s:id", dev->info->alias,
                                  "s:sysfsdev", mdevPath,
                                  "S:display", qemuOnOffAuto(mdevsrc->display),
+                                 "T:ramfb", mdevsrc->ramfb,
+                                 "p:bootindex", dev->info->bootIndex,
                                  NULL) < 0)
         return NULL;
 
     if (qemuBuildDeviceAddressProps(props, def, dev->info) < 0)
         return NULL;
 
-    if (virJSONValueObjectAdd(props,
-                              "T:ramfb", mdevsrc->ramfb,
-                              "p:bootindex", dev->info->bootIndex,
-                              NULL) < 0)
-        return NULL;
-
     return g_steal_pointer(&props);
 }
 
index 0fd2da8c7376795635c2081908df0d02dd9310d0..ab1ac4e1beaa01cb3f04ea12f9788c0fcd149c18 100644 (file)
@@ -29,6 +29,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \
 -audiodev id=audio1,driver=none \
 -vnc 127.0.0.1:0,audiodev=audio1 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \
--device vfio-pci-nohotplug,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/53764d0e-85a0-42b4-af5c-2046b460b1dc,display=on,bus=pci.0,addr=0x3,ramfb=on \
+-device vfio-pci-nohotplug,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/53764d0e-85a0-42b4-af5c-2046b460b1dc,display=on,ramfb=on,bus=pci.0,addr=0x3 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 3b0e262336b76270aa185b2bef331ce9027fc9b9..ca90ef6c55c778e35a0d940cfe4f266dd68d7245 100644 (file)
@@ -26,7 +26,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -boot strict=on \
 -audiodev id=audio1,driver=none \
--device vfio-ccw,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627,devno=fe.0.0000,bootindex=1 \
+-device vfio-ccw,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627,bootindex=1,devno=fe.0.0000 \
 -device virtio-balloon-ccw,id=balloon0,devno=fe.0.0001 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on