qemuxml2argvtest: Switch to modern vfio backend

The pci-assign device is so old school that no one uses it. All
modern systems have adapted VFIO. Switch our xml2argv test too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Michal Privoznik 2019-08-12 16:47:14 +02:00
parent 5cd4606e38
commit 9b3df94ac4
7 changed files with 14 additions and 15 deletions

View File

@ -27,5 +27,5 @@ server,nowait \
-usb \
-drive file=/dev/HostVG/QEMUGuest2,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 pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
-device vfio-pci,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

View File

@ -27,4 +27,4 @@ server,nowait \
-usb \
-drive file=/dev/HostVG/QEMUGuest2,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 pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3
-device vfio-pci,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3

View File

@ -27,5 +27,4 @@ server,nowait \
-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=2 \
-device pci-assign,host=0000:03:07.1,id=hostdev0,bootindex=1,bus=pci.0,\
addr=0x3
-device vfio-pci,host=0000:03:07.1,id=hostdev0,bootindex=1,bus=pci.0,addr=0x3

View File

@ -27,5 +27,5 @@ server,nowait \
-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 pci-assign,host=2424:21:1c.6,id=hostdev0,bus=pci.0,addr=0x3 \
-device vfio-pci,host=2424:21:1c.6,id=hostdev0,bus=pci.0,addr=0x3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

View File

@ -27,5 +27,5 @@ server,nowait \
-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 pci-assign,host=0000:03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
-device vfio-pci,host=0000:03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

View File

@ -33,7 +33,7 @@ addr=0x3,rombar=1 \
-netdev user,id=hostnet1 \
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:24:a5:9e,bus=pci.0,\
addr=0x4,romfile=/etc/fake/bootrom.bin \
-device pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x5,rombar=0 \
-device pci-assign,host=0000:06:12.6,id=hostdev1,bus=pci.0,addr=0x6,rombar=1,\
-device vfio-pci,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x5,rombar=0 \
-device vfio-pci,host=0000:06:12.6,id=hostdev1,bus=pci.0,addr=0x6,rombar=1,\
romfile=/etc/fake/bootrom.bin \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7

View File

@ -496,7 +496,7 @@ testCompareXMLToArgv(const void *data)
if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI &&
hostdev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT) {
hostdev->source.subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM;
hostdev->source.subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO;
}
}
@ -1303,9 +1303,9 @@ mymain(void)
DO_TEST("net-many-models", NONE);
DO_TEST("net-mcast", NONE);
DO_TEST("net-udp", NONE);
DO_TEST("net-hostdev", NONE);
DO_TEST("net-hostdev-bootorder", NONE);
DO_TEST("net-hostdev-multidomain", NONE);
DO_TEST("net-hostdev", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("net-hostdev-bootorder", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("net-hostdev-multidomain", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("net-hostdev-vfio",
QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("net-hostdev-vfio-multidomain",
@ -1576,8 +1576,8 @@ mymain(void)
DO_TEST("hostdev-usb-address", NONE);
DO_TEST("hostdev-usb-address-device", NONE);
DO_TEST("hostdev-usb-address-device-boot", NONE);
DO_TEST("hostdev-pci-address", NONE);
DO_TEST("hostdev-pci-address-device", NONE);
DO_TEST("hostdev-pci-address", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("hostdev-pci-address-device", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("hostdev-vfio",
QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("hostdev-vfio-multidomain",
@ -1613,7 +1613,7 @@ mymain(void)
QEMU_CAPS_DEVICE_ZPCI);
DO_TEST_PARSE_ERROR("hostdev-vfio-zpci",
QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("pci-rom", NONE);
DO_TEST("pci-rom", QEMU_CAPS_DEVICE_VFIO_PCI);
DO_TEST("pci-rom-disabled", NONE);
DO_TEST("pci-rom-disabled-invalid", NONE);