tests: qemuxml2argvdata: switch zpci address generation to real caps

Among the usual changes, this puts the virtio memballoon on the CCW bus.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2022-09-30 16:02:23 +02:00
parent 41eb0f446c
commit e4e22bf3ed
6 changed files with 29 additions and 32 deletions

View File

@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-s390x \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
-accel tcg \
-cpu qemu \
-m 214 \
-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@ -29,6 +31,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
-device zpci,uid=5,fid=1,target=hostdev1,id=zpci5 \
-device vfio-pci,host=0001:00:00.0,id=hostdev1,bus=pci.0,addr=0x2 \
-device zpci,uid=2,fid=2,target=balloon0,id=zpci2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-s390x \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
-accel tcg \
-cpu qemu \
-m 214 \
-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@ -29,6 +31,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
-device zpci,uid=2,fid=31,target=hostdev1,id=zpci2 \
-device vfio-pci,host=0000:00:01.0,id=hostdev1,bus=pci.0,addr=0x2 \
-device zpci,uid=3,fid=1,target=balloon0,id=zpci3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-s390x \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
-accel tcg \
-cpu qemu \
-m 214 \
-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@ -27,6 +29,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device zpci,uid=1,fid=0,target=hostdev0,id=zpci1 \
-device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
-device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -9,10 +9,12 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-s390x \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
-accel tcg \
-cpu qemu \
-m 214 \
-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@ -41,6 +43,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-device vfio-pci,host=0007:00:00.0,id=hostdev6,bus=pci.0,addr=0x4 \
-device zpci,uid=4,fid=40,target=hostdev7,id=zpci4 \
-device vfio-pci,host=0008:00:00.0,id=hostdev7,bus=pci.0,addr=0x6 \
-device zpci,uid=5,fid=4,target=balloon0,id=zpci5 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -1875,22 +1875,11 @@ mymain(void)
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-autogenerate-fids",
QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-invalid-uid-valid-fid",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST("hostdev-vfio-zpci-multidomain-many",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST("hostdev-vfio-zpci-autogenerate",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST("hostdev-vfio-zpci-autogenerate-uids",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST("hostdev-vfio-zpci-autogenerate-fids",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("hostdev-vfio-zpci-invalid-uid-valid-fid", "s390x");
DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-multidomain-many", "s390x");
DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate", "s390x");
DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate-uids", "s390x");
DO_TEST_CAPS_ARCH_LATEST("hostdev-vfio-zpci-autogenerate-fids", "s390x");
DO_TEST_PARSE_ERROR("hostdev-vfio-zpci-uid-set-zero",
QEMU_CAPS_DEVICE_VFIO_PCI,
QEMU_CAPS_DEVICE_ZPCI);