Add separate tests for individual options and devices for virtio-options to have the ability to do more fine-granular testing of various combinations. Also, add negative tests for unavailable capabilities. Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx> Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx> --- .../virtio-options-controller-ats.args | 32 ++++++ .../virtio-options-controller-ats.xml | 38 +++++++ .../virtio-options-controller-iommu.args | 34 +++++++ .../virtio-options-controller-iommu.xml | 38 +++++++ .../virtio-options-controller-packed.args | 32 ++++++ .../virtio-options-controller-packed.xml | 38 +++++++ .../virtio-options-disk-ats.args | 36 +++++++ .../virtio-options-disk-ats.xml | 34 +++++++ .../virtio-options-disk-iommu.args | 36 +++++++ .../virtio-options-disk-iommu.xml | 34 +++++++ .../virtio-options-disk-packed.args | 36 +++++++ .../virtio-options-disk-packed.xml | 34 +++++++ .../virtio-options-fs-ats.args | 34 +++++++ .../virtio-options-fs-ats.xml | 34 +++++++ .../virtio-options-fs-iommu.args | 34 +++++++ .../virtio-options-fs-iommu.xml | 34 +++++++ .../virtio-options-fs-packed.args | 34 +++++++ .../virtio-options-fs-packed.xml | 34 +++++++ .../virtio-options-input-ats.args | 30 ++++++ .../virtio-options-input-ats.xml | 30 ++++++ .../virtio-options-input-iommu.args | 30 ++++++ .../virtio-options-input-iommu.xml | 30 ++++++ .../virtio-options-input-packed.args | 30 ++++++ .../virtio-options-input-packed.xml | 30 ++++++ .../virtio-options-memballoon-ats.args | 28 ++++++ .../virtio-options-memballoon-ats.xml | 23 +++++ .../virtio-options-memballoon-iommu.args | 28 ++++++ .../virtio-options-memballoon-iommu.xml | 23 +++++ .../virtio-options-memballoon-packed.args | 28 ++++++ .../virtio-options-memballoon-packed.xml | 23 +++++ .../virtio-options-net-ats.args | 34 +++++++ .../virtio-options-net-ats.xml | 34 +++++++ .../virtio-options-net-iommu.args | 34 +++++++ .../virtio-options-net-iommu.xml | 34 +++++++ .../virtio-options-net-packed.args | 34 +++++++ .../virtio-options-net-packed.xml | 34 +++++++ .../virtio-options-rng-ats.args | 32 ++++++ .../virtio-options-rng-ats.xml | 32 ++++++ .../virtio-options-rng-iommu.args | 34 +++++++ .../virtio-options-rng-iommu.xml | 32 ++++++ .../virtio-options-rng-packed.args | 32 ++++++ .../virtio-options-rng-packed.xml | 32 ++++++ .../virtio-options-video-ats.args | 34 +++++++ .../virtio-options-video-ats.xml | 36 +++++++ .../virtio-options-video-iommu.args | 34 +++++++ .../virtio-options-video-iommu.xml | 36 +++++++ .../virtio-options-video-packed.args | 34 +++++++ .../virtio-options-video-packed.xml | 36 +++++++ tests/qemuxml2argvtest.c | 99 +++++++++++++++++++ 49 files changed, 1666 insertions(+) create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.args create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.args create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.xml create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.args create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.xml diff --git a/tests/qemuxml2argvdata/virtio-options-controller-ats.args b/tests/qemuxml2argvdata/virtio-options-controller-ats.args new file mode 100644 index 00000000..c7186ed2 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-ats.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-device virtio-scsi-pci,ats=on,id=scsi0,bus=pci.0,addr=0x2 \ +-device virtio-scsi-pci,ats=off,id=scsi1,bus=pci.0,addr=0x3 \ +-device virtio-serial-pci,id=virtio-serial0,ats=on,bus=pci.0,addr=0x4 \ +-device virtio-serial-pci,id=virtio-serial1,ats=off,bus=pci.0,addr=0x5 \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 diff --git a/tests/qemuxml2argvdata/virtio-options-controller-ats.xml b/tests/qemuxml2argvdata/virtio-options-controller-ats.xml new file mode 100644 index 00000000..b436eaf0 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-ats.xml @@ -0,0 +1,38 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <controller type='scsi' index='0' model='virtio-scsi'> + <driver ats='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='scsi' index='1' model='virtio-scsi'> + <driver ats='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <controller type='virtio-serial' index='0'> + <driver ats='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </controller> + <controller type='virtio-serial' index='1'> + <driver ats='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-controller-iommu.args b/tests/qemuxml2argvdata/virtio-options-controller-iommu.args new file mode 100644 index 00000000..6d60c5e6 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-iommu.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-device virtio-scsi-pci,iommu_platform=on,id=scsi0,bus=pci.0,addr=0x2 \ +-device virtio-scsi-pci,iommu_platform=off,id=scsi1,bus=pci.0,addr=0x3 \ +-device virtio-serial-pci,id=virtio-serial0,iommu_platform=on,bus=pci.0,\ +addr=0x4 \ +-device virtio-serial-pci,id=virtio-serial1,iommu_platform=off,bus=pci.0,\ +addr=0x5 \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 diff --git a/tests/qemuxml2argvdata/virtio-options-controller-iommu.xml b/tests/qemuxml2argvdata/virtio-options-controller-iommu.xml new file mode 100644 index 00000000..86be5f0d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-iommu.xml @@ -0,0 +1,38 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <controller type='scsi' index='0' model='virtio-scsi'> + <driver iommu='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='scsi' index='1' model='virtio-scsi'> + <driver iommu='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <controller type='virtio-serial' index='0'> + <driver iommu='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </controller> + <controller type='virtio-serial' index='1'> + <driver iommu='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-controller-packed.args b/tests/qemuxml2argvdata/virtio-options-controller-packed.args new file mode 100644 index 00000000..e853e53d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-packed.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-device virtio-scsi-pci,packed=on,id=scsi0,bus=pci.0,addr=0x2 \ +-device virtio-scsi-pci,packed=off,id=scsi1,bus=pci.0,addr=0x3 \ +-device virtio-serial-pci,id=virtio-serial0,packed=on,bus=pci.0,addr=0x4 \ +-device virtio-serial-pci,id=virtio-serial1,packed=off,bus=pci.0,addr=0x5 \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 diff --git a/tests/qemuxml2argvdata/virtio-options-controller-packed.xml b/tests/qemuxml2argvdata/virtio-options-controller-packed.xml new file mode 100644 index 00000000..864fec45 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-controller-packed.xml @@ -0,0 +1,38 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <controller type='scsi' index='0' model='virtio-scsi'> + <driver packed='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='scsi' index='1' model='virtio-scsi'> + <driver packed='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + <controller type='virtio-serial' index='0'> + <driver packed='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </controller> + <controller type='virtio-serial' index='1'> + <driver packed='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> + </controller> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-disk-ats.args b/tests/qemuxml2argvdata/virtio-options-disk-ats.args new file mode 100644 index 00000000..294ad2d4 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-ats.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-drive file=/var/lib/libvirt/images/img1,format=raw,if=none,\ +id=drive-virtio-disk0 \ +-device virtio-blk-pci,ats=on,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ +-drive file=/var/lib/libvirt/images/img2,format=raw,if=none,\ +id=drive-virtio-disk1 \ +-device virtio-blk-pci,ats=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-disk-ats.xml b/tests/qemuxml2argvdata/virtio-options-disk-ats.xml new file mode 100644 index 00000000..d0698126 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-ats.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' ats='on'/> + <source file='/var/lib/libvirt/images/img1'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' ats='off'/> + <source file='/var/lib/libvirt/images/img2'/> + <target dev='vdb' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </disk> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-disk-iommu.args b/tests/qemuxml2argvdata/virtio-options-disk-iommu.args new file mode 100644 index 00000000..185c57ca --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-iommu.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-drive file=/var/lib/libvirt/images/img1,format=raw,if=none,\ +id=drive-virtio-disk0 \ +-device virtio-blk-pci,iommu_platform=on,bus=pci.0,addr=0x2,\ +drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-drive file=/var/lib/libvirt/images/img2,format=raw,if=none,\ +id=drive-virtio-disk1 \ +-device virtio-blk-pci,iommu_platform=off,bus=pci.0,addr=0x3,\ +drive=drive-virtio-disk1,id=virtio-disk1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-disk-iommu.xml b/tests/qemuxml2argvdata/virtio-options-disk-iommu.xml new file mode 100644 index 00000000..ac09b58e --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-iommu.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' iommu='on'/> + <source file='/var/lib/libvirt/images/img1'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' iommu='off'/> + <source file='/var/lib/libvirt/images/img2'/> + <target dev='vdb' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </disk> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-disk-packed.args b/tests/qemuxml2argvdata/virtio-options-disk-packed.args new file mode 100644 index 00000000..1fb3735d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-packed.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-drive file=/var/lib/libvirt/images/img1,format=raw,if=none,\ +id=drive-virtio-disk0 \ +-device virtio-blk-pci,packed=on,bus=pci.0,addr=0x2,drive=drive-virtio-disk0,\ +id=virtio-disk0,bootindex=1 \ +-drive file=/var/lib/libvirt/images/img2,format=raw,if=none,\ +id=drive-virtio-disk1 \ +-device virtio-blk-pci,packed=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk1,\ +id=virtio-disk1 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-disk-packed.xml b/tests/qemuxml2argvdata/virtio-options-disk-packed.xml new file mode 100644 index 00000000..7edbaad6 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-disk-packed.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' packed='on'/> + <source file='/var/lib/libvirt/images/img1'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='raw' packed='off'/> + <source file='/var/lib/libvirt/images/img2'/> + <target dev='vdb' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </disk> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-fs-ats.args b/tests/qemuxml2argvdata/virtio-options-fs-ats.args new file mode 100644 index 00000000..1ab99418 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-ats.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ +-device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,ats=on,bus=pci.0,\ +addr=0x2 \ +-fsdev local,security_model=passthrough,id=fsdev-fs1,path=/export/fs2 \ +-device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=fs2,ats=off,bus=pci.0,\ +addr=0x3 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-fs-ats.xml b/tests/qemuxml2argvdata/virtio-options-fs-ats.xml new file mode 100644 index 00000000..5338c88a --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-ats.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <filesystem type='mount' accessmode='passthrough'> + <driver ats='on'/> + <source dir='/export/fs1'/> + <target dir='fs1'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </filesystem> + <filesystem type='mount' accessmode='passthrough'> + <driver ats='off'/> + <source dir='/export/fs2'/> + <target dir='fs2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </filesystem> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-fs-iommu.args b/tests/qemuxml2argvdata/virtio-options-fs-iommu.args new file mode 100644 index 00000000..da40896b --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-iommu.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ +-device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,iommu_platform=on,\ +bus=pci.0,addr=0x2 \ +-fsdev local,security_model=passthrough,id=fsdev-fs1,path=/export/fs2 \ +-device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=fs2,iommu_platform=off,\ +bus=pci.0,addr=0x3 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-fs-iommu.xml b/tests/qemuxml2argvdata/virtio-options-fs-iommu.xml new file mode 100644 index 00000000..31180afc --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-iommu.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <filesystem type='mount' accessmode='passthrough'> + <driver iommu='on'/> + <source dir='/export/fs1'/> + <target dir='fs1'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </filesystem> + <filesystem type='mount' accessmode='passthrough'> + <driver iommu='off'/> + <source dir='/export/fs2'/> + <target dir='fs2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </filesystem> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-fs-packed.args b/tests/qemuxml2argvdata/virtio-options-fs-packed.args new file mode 100644 index 00000000..66c16f00 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-packed.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \ +-device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=fs1,packed=on,bus=pci.0,\ +addr=0x2 \ +-fsdev local,security_model=passthrough,id=fsdev-fs1,path=/export/fs2 \ +-device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=fs2,packed=off,\ +bus=pci.0,addr=0x3 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-fs-packed.xml b/tests/qemuxml2argvdata/virtio-options-fs-packed.xml new file mode 100644 index 00000000..e8d6d50a --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-fs-packed.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <filesystem type='mount' accessmode='passthrough'> + <driver packed='on'/> + <source dir='/export/fs1'/> + <target dir='fs1'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </filesystem> + <filesystem type='mount' accessmode='passthrough'> + <driver packed='off'/> + <source dir='/export/fs2'/> + <target dir='fs2'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </filesystem> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-input-ats.args b/tests/qemuxml2argvdata/virtio-options-input-ats.args new file mode 100644 index 00000000..9906d9b6 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-ats.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-mouse-pci,id=input0,bus=pci.0,addr=0x2,ats=on \ +-device virtio-keyboard-pci,id=input1,bus=pci.0,addr=0x3,ats=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-input-ats.xml b/tests/qemuxml2argvdata/virtio-options-input-ats.xml new file mode 100644 index 00000000..b911ff62 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-ats.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='virtio'> + <driver ats='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </input> + <input type='keyboard' bus='virtio'> + <driver ats='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </input> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-input-iommu.args b/tests/qemuxml2argvdata/virtio-options-input-iommu.args new file mode 100644 index 00000000..69d08897 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-iommu.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-mouse-pci,id=input0,bus=pci.0,addr=0x2,iommu_platform=on \ +-device virtio-keyboard-pci,id=input1,bus=pci.0,addr=0x3,iommu_platform=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-input-iommu.xml b/tests/qemuxml2argvdata/virtio-options-input-iommu.xml new file mode 100644 index 00000000..31fd74be --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-iommu.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='virtio'> + <driver iommu='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </input> + <input type='keyboard' bus='virtio'> + <driver iommu='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </input> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-input-packed.args b/tests/qemuxml2argvdata/virtio-options-input-packed.args new file mode 100644 index 00000000..f89450cf --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-packed.args @@ -0,0 +1,30 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-mouse-pci,id=input0,bus=pci.0,addr=0x2,packed=on \ +-device virtio-keyboard-pci,id=input1,bus=pci.0,addr=0x3,packed=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-input-packed.xml b/tests/qemuxml2argvdata/virtio-options-input-packed.xml new file mode 100644 index 00000000..1378b42d --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-input-packed.xml @@ -0,0 +1,30 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <input type='mouse' bus='virtio'> + <driver packed='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </input> + <input type='keyboard' bus='virtio'> + <driver packed='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </input> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-ats.args b/tests/qemuxml2argvdata/virtio-options-memballoon-ats.args new file mode 100644 index 00000000..bb507b74 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-ats.args @@ -0,0 +1,28 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2,ats=on diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml b/tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml new file mode 100644 index 00000000..f1ac052c --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml @@ -0,0 +1,23 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <driver ats='on'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args b/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args new file mode 100644 index 00000000..9c1d15b8 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args @@ -0,0 +1,28 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2,iommu_platform=on diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml b/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml new file mode 100644 index 00000000..eba704e1 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml @@ -0,0 +1,23 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <driver iommu='on'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-packed.args b/tests/qemuxml2argvdata/virtio-options-memballoon-packed.args new file mode 100644 index 00000000..6bda122f --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-packed.args @@ -0,0 +1,28 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2,packed=on diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml b/tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml new file mode 100644 index 00000000..5597ef93 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml @@ -0,0 +1,23 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + <driver packed='on'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-net-ats.args b/tests/qemuxml2argvdata/virtio-options-net-ats.args new file mode 100644 index 00000000..020f1acd --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-ats.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-netdev user,id=hostnet0 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:56:58:5a:5c,bus=pci.0,\ +addr=0x2,ats=on \ +-netdev user,id=hostnet1 \ +-device virtio-net-pci,netdev=hostnet1,id=net1,mac=62:64:66:68:6a:6c,bus=pci.0,\ +addr=0x3,ats=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-net-ats.xml b/tests/qemuxml2argvdata/virtio-options-net-ats.xml new file mode 100644 index 00000000..b1e3ff28 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-ats.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <interface type='user'> + <mac address='52:54:56:58:5a:5c'/> + <model type='virtio'/> + <driver ats='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </interface> + <interface type='user'> + <mac address='62:64:66:68:6a:6c'/> + <model type='virtio'/> + <driver ats='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-net-iommu.args b/tests/qemuxml2argvdata/virtio-options-net-iommu.args new file mode 100644 index 00000000..7d775c69 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-iommu.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-netdev user,id=hostnet0 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:56:58:5a:5c,bus=pci.0,\ +addr=0x2,iommu_platform=on \ +-netdev user,id=hostnet1 \ +-device virtio-net-pci,netdev=hostnet1,id=net1,mac=62:64:66:68:6a:6c,bus=pci.0,\ +addr=0x3,iommu_platform=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-net-iommu.xml b/tests/qemuxml2argvdata/virtio-options-net-iommu.xml new file mode 100644 index 00000000..689eaa8f --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-iommu.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <interface type='user'> + <mac address='52:54:56:58:5a:5c'/> + <model type='virtio'/> + <driver iommu='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </interface> + <interface type='user'> + <mac address='62:64:66:68:6a:6c'/> + <model type='virtio'/> + <driver iommu='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-net-packed.args b/tests/qemuxml2argvdata/virtio-options-net-packed.args new file mode 100644 index 00000000..3122ff56 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-packed.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-netdev user,id=hostnet0 \ +-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:56:58:5a:5c,bus=pci.0,\ +addr=0x2,packed=on \ +-netdev user,id=hostnet1 \ +-device virtio-net-pci,netdev=hostnet1,id=net1,mac=62:64:66:68:6a:6c,bus=pci.0,\ +addr=0x3,packed=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-net-packed.xml b/tests/qemuxml2argvdata/virtio-options-net-packed.xml new file mode 100644 index 00000000..85e39761 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-net-packed.xml @@ -0,0 +1,34 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <interface type='user'> + <mac address='52:54:56:58:5a:5c'/> + <model type='virtio'/> + <driver packed='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </interface> + <interface type='user'> + <mac address='62:64:66:68:6a:6c'/> + <model type='virtio'/> + <driver packed='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-rng-ats.args b/tests/qemuxml2argvdata/virtio-options-rng-ats.args new file mode 100644 index 00000000..2ce3be00 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-ats.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng0,id=rng0,ats=on,bus=pci.0,addr=0x2 \ +-object rng-random,id=objrng1,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng1,id=rng1,ats=off,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/virtio-options-rng-ats.xml b/tests/qemuxml2argvdata/virtio-options-rng-ats.xml new file mode 100644 index 00000000..d4b0f5f1 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-ats.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver ats='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </rng> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver ats='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </rng> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-rng-iommu.args b/tests/qemuxml2argvdata/virtio-options-rng-iommu.args new file mode 100644 index 00000000..781d4293 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-iommu.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng0,id=rng0,iommu_platform=on,bus=pci.0,\ +addr=0x2 \ +-object rng-random,id=objrng1,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng1,id=rng1,iommu_platform=off,bus=pci.0,\ +addr=0x3 diff --git a/tests/qemuxml2argvdata/virtio-options-rng-iommu.xml b/tests/qemuxml2argvdata/virtio-options-rng-iommu.xml new file mode 100644 index 00000000..43bead71 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-iommu.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver iommu='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </rng> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver iommu='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </rng> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-rng-packed.args b/tests/qemuxml2argvdata/virtio-options-rng-packed.args new file mode 100644 index 00000000..c415314f --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-packed.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng0,id=rng0,packed=on,bus=pci.0,addr=0x2 \ +-object rng-random,id=objrng1,filename=/dev/random \ +-device virtio-rng-pci,rng=objrng1,id=rng1,packed=off,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/virtio-options-rng-packed.xml b/tests/qemuxml2argvdata/virtio-options-rng-packed.xml new file mode 100644 index 00000000..22f7e413 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-rng-packed.xml @@ -0,0 +1,32 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver packed='on'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </rng> + <rng model='virtio'> + <backend model='random'>/dev/random</backend> + <driver packed='off'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </rng> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-video-ats.args b/tests/qemuxml2argvdata/virtio-options-video-ats.args new file mode 100644 index 00000000..2d1a7086 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-ats.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-chardev socket,id=chr-vu-video0,fd=1729 \ +-chardev socket,id=chr-vu-video1,fd=1729 \ +-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\ +bus=pci.0,addr=0x2,ats=on \ +-device vhost-user-gpu-pci,id=video1,max_outputs=1,chardev=chr-vu-video1,\ +bus=pci.0,addr=0x3,ats=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-video-ats.xml b/tests/qemuxml2argvdata/virtio-options-video-ats.xml new file mode 100644 index 00000000..c39523d9 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-ats.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <video> + <driver ats='on' name='vhostuser'/> + <model type='virtio' heads='1' primary='yes'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <video> + <driver ats='off' name='vhostuser'/> + <model type='virtio' heads='1' primary='no'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-video-iommu.args b/tests/qemuxml2argvdata/virtio-options-video-iommu.args new file mode 100644 index 00000000..1ab891c5 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-iommu.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-chardev socket,id=chr-vu-video0,fd=1729 \ +-chardev socket,id=chr-vu-video1,fd=1729 \ +-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\ +bus=pci.0,addr=0x2,iommu_platform=on \ +-device vhost-user-gpu-pci,id=video1,max_outputs=1,chardev=chr-vu-video1,\ +bus=pci.0,addr=0x3,iommu_platform=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-video-iommu.xml b/tests/qemuxml2argvdata/virtio-options-video-iommu.xml new file mode 100644 index 00000000..13d921e2 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-iommu.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <video> + <driver iommu='on' name='vhostuser'/> + <model type='virtio' heads='1' primary='yes'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <video> + <driver iommu='off' name='vhostuser'/> + <model type='virtio' heads='1' primary='no'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/virtio-options-video-packed.args b/tests/qemuxml2argvdata/virtio-options-video-packed.args new file mode 100644 index 00000000..93551d0b --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-packed.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-realtime mlock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ +server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-chardev socket,id=chr-vu-video0,fd=1729 \ +-chardev socket,id=chr-vu-video1,fd=1729 \ +-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\ +bus=pci.0,addr=0x2,packed=on \ +-device vhost-user-gpu-pci,id=video1,max_outputs=1,chardev=chr-vu-video1,\ +bus=pci.0,addr=0x3,packed=off \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/virtio-options-video-packed.xml b/tests/qemuxml2argvdata/virtio-options-video-packed.xml new file mode 100644 index 00000000..4ef06b77 --- /dev/null +++ b/tests/qemuxml2argvdata/virtio-options-video-packed.xml @@ -0,0 +1,36 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu-system-x86_64</emulator> + <controller type='pci' index='0' model='pci-root'/> + <video> + <driver packed='on' name='vhostuser'/> + <model type='virtio' heads='1' primary='yes'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </video> + <video> + <driver packed='off' name='vhostuser'/> + <model type='virtio' heads='1' primary='no'> + <acceleration accel3d='yes' rendernode='/dev/dri/test'/> + </model> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </video> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> + </memballoon> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index dffca323..7ceb3aee 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2982,6 +2982,105 @@ mymain(void) QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); DO_TEST_CAPS_LATEST("virtio-options"); + DO_TEST("virtio-options-controller-iommu", QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-disk-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-fs-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-input-iommu", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD, + QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-memballoon-iommu", + QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-net-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-rng-iommu", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM, + QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-video-iommu", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU, + QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM); + DO_TEST("virtio-options-controller-ats", QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-disk-ats", QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-fs-ats", QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-input-ats", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD, + QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-memballoon-ats", + QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-net-ats", QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-rng-ats", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM, + QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-video-ats", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU, + QEMU_CAPS_VIRTIO_PCI_ATS); + DO_TEST("virtio-options-controller-packed", QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-disk-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-fs-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-input-packed", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-memballoon-packed", + QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-net-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-rng-packed", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST("virtio-options-video-packed", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU, + QEMU_CAPS_VIRTIO_PACKED_QUEUES); + DO_TEST_FAILURE("virtio-options-controller-iommu", QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_FAILURE("virtio-options-disk-iommu", NONE); + DO_TEST_FAILURE("virtio-options-fs-iommu", NONE); + DO_TEST_FAILURE("virtio-options-input-iommu", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD); + DO_TEST_FAILURE("virtio-options-memballoon-iommu", NONE); + DO_TEST_FAILURE("virtio-options-net-iommu", NONE); + DO_TEST_FAILURE("virtio-options-rng-iommu", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_FAILURE("virtio-options-video-iommu", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU); + DO_TEST_FAILURE("virtio-options-controller-ats", QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_FAILURE("virtio-options-disk-ats", NONE); + DO_TEST_FAILURE("virtio-options-fs-ats", NONE); + DO_TEST_FAILURE("virtio-options-input-ats", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD); + DO_TEST_FAILURE("virtio-options-memballoon-ats", NONE); + DO_TEST_FAILURE("virtio-options-net-ats", NONE); + DO_TEST_FAILURE("virtio-options-rng-ats", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_FAILURE("virtio-options-video-ats", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU); + DO_TEST_FAILURE("virtio-options-controller-packed", QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_FAILURE("virtio-options-disk-packed", NONE); + DO_TEST_FAILURE("virtio-options-fs-packed", NONE); + DO_TEST_FAILURE("virtio-options-input-packed", QEMU_CAPS_VIRTIO_MOUSE, + QEMU_CAPS_VIRTIO_KEYBOARD); + DO_TEST_FAILURE("virtio-options-memballoon-packed", NONE); + DO_TEST_FAILURE("virtio-options-net-packed", NONE); + DO_TEST_FAILURE("virtio-options-rng-packed", QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST_FAILURE("virtio-options-video-packed", QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_DEVICE_VIDEO_PRIMARY, + QEMU_CAPS_DEVICE_VHOST_USER_GPU); DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_KVM); -- 2.24.1