From: Peter Krempa Date: Wed, 6 Oct 2021 14:36:41 +0000 (+0200) Subject: qemuBuildHostdevMediatedDevProps: Move 'ramfb' and 'bootindex' before the address X-Git-Tag: v7.9.0-rc1~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ac81c58d35dcf0d3059902d341bc5f2c7dbe41d;p=thirdparty%2Flibvirt.git qemuBuildHostdevMediatedDevProps: Move 'ramfb' and 'bootindex' before the address Simplify the generator by moving few properties earlier. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8fab9fac23..de10043059 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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); } 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