[PATCH 064/103] qemuBuildHostdevMediatedDevProps: Move 'ramfb' and 'bootindex' before the address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simplify the generator by moving few properties earlier.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c                                   | 8 ++------
 .../hostdev-mdev-display-ramfb.x86_64-latest.args         | 2 +-
 .../hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args   | 2 +-
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2f9e99068a..99287c013a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5353,18 +5353,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);
 }

diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display-ramfb.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display-ramfb.x86_64-latest.args
index 0fd2da8c73..ab1ac4e1be 100644
--- a/tests/qemuxml2argvdata/hostdev-mdev-display-ramfb.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display-ramfb.x86_64-latest.args
@@ -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
diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
index 3b0e262336..ca90ef6c55 100644
--- a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
@@ -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
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux