]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Expand coverage for automatic/default USB controllers
authorAndrea Bolognani <abologna@redhat.com>
Fri, 18 Jul 2025 14:27:48 +0000 (16:27 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 6 Oct 2025 09:15:21 +0000 (11:15 +0200)
We're missing a significant number of scenarios, including
those involving fairly common machine types and architectures.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
69 files changed:
tests/qemuxmlconfdata/usb-controller-automatic-microvm.x86_64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-microvm.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-pseries.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-realview.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-s390x.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-microvm.x86_64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-microvm.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-s390x.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.err [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.xml [new symlink]
tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.xml [new file with mode: 0644]
tests/qemuxmlconftest.c

diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-microvm.x86_64-latest.err b/tests/qemuxmlconfdata/usb-controller-automatic-microvm.x86_64-latest.err
new file mode 100644 (file)
index 0000000..a0ca4fb
--- /dev/null
@@ -0,0 +1 @@
+XML error: No PCI buses available
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-microvm.xml b/tests/qemuxmlconfdata/usb-controller-automatic-microvm.xml
new file mode 100644 (file)
index 0000000..b074d5e
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='microvm'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.args b/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.args
new file mode 100644 (file)
index 0000000..3d8df5f
--- /dev/null
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
+/usr/bin/qemu-system-ppc64 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
+-accel tcg \
+-cpu POWER10 \
+-m size=262144k \
+-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":268435456}' \
+-overcommit mem-lock=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,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.xml b/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.abi-update.xml
new file mode 100644 (file)
index 0000000..1c11a18
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER10</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0' model='qemu-xhci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.args
new file mode 100644 (file)
index 0000000..1859e1f
--- /dev/null
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
+/usr/bin/qemu-system-ppc64 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
+-accel tcg \
+-cpu POWER10 \
+-m size=262144k \
+-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":268435456}' \
+-overcommit mem-lock=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,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-pseries.ppc64-latest.xml
new file mode 100644 (file)
index 0000000..e92535a
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER10</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0' model='pci-ohci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-pseries.xml b/tests/qemuxmlconfdata/usb-controller-automatic-pseries.xml
new file mode 100644 (file)
index 0000000..9951364
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.args
new file mode 100644 (file)
index 0000000..84a88aa
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=aarch64test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}' \
+-machine realview-pbx-a9,usb=off,dump-guest-core=off \
+-accel kvm \
+-cpu host \
+-m size=1048576k \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pci-ohci","id":"usb"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..372d5bd
--- /dev/null
@@ -0,0 +1,22 @@
+<domain type='kvm'>
+  <name>aarch64test</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='realview-pbx-a9'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='host-passthrough' check='none'/>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0' model='pci-ohci'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-realview.xml b/tests/qemuxmlconfdata/usb-controller-automatic-realview.xml
new file mode 100644 (file)
index 0000000..b58b207
--- /dev/null
@@ -0,0 +1,14 @@
+<domain type='kvm'>
+  <name>aarch64test</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='realview-pbx-a9'>hvm</type>
+  </os>
+  <cpu mode='host-passthrough'/>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.args
new file mode 100644 (file)
index 0000000..77901f7
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-s390x \
+-name guest=guest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
+-accel tcg \
+-cpu qemu \
+-m size=4194304k \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":4294967296}' \
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-s390x.s390x-latest.xml
new file mode 100644 (file)
index 0000000..60d84a8
--- /dev/null
@@ -0,0 +1,25 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <controller type='pci' index='0' model='pci-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='s390'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-s390x.xml b/tests/qemuxmlconfdata/usb-controller-automatic-s390x.xml
new file mode 100644 (file)
index 0000000..4f8b9c6
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory>4194304</memory>
+  <vcpu>4</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.err b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.err
new file mode 100644 (file)
index 0000000..cac4e8e
--- /dev/null
@@ -0,0 +1 @@
+internal error: Unable to determine model for USB controller idx=0
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.abi-update.xml
new file mode 100644 (file)
index 0000000..2b71e44
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER10</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.err b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.err
new file mode 100644 (file)
index 0000000..cac4e8e
--- /dev/null
@@ -0,0 +1 @@
+internal error: Unable to determine model for USB controller idx=0
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.ppc64-latest.xml
new file mode 100644 (file)
index 0000000..2b71e44
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>POWER10</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'>
+      <model name='spapr-pci-host-bridge'/>
+      <target index='0'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-pseries.xml
new file mode 120000 (symlink)
index 0000000..c3ab9c9
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-automatic-pseries.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.err b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.err
new file mode 100644 (file)
index 0000000..918b72d
--- /dev/null
@@ -0,0 +1 @@
+unsupported configuration: USB controller model 'pci-ohci' not supported in this QEMU binary
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..372d5bd
--- /dev/null
@@ -0,0 +1,22 @@
+<domain type='kvm'>
+  <name>aarch64test</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='realview-pbx-a9'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='host-passthrough' check='none'/>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0' model='pci-ohci'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-realview.xml
new file mode 120000 (symlink)
index 0000000..ba1fa87
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-automatic-realview.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.err b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.err
new file mode 100644 (file)
index 0000000..918b72d
--- /dev/null
@@ -0,0 +1 @@
+unsupported configuration: USB controller model 'pci-ohci' not supported in this QEMU binary
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.armv7l-latest.xml
new file mode 100644 (file)
index 0000000..482029e
--- /dev/null
@@ -0,0 +1,27 @@
+<domain type='qemu'>
+  <name>armv7ltest</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='armv7l' machine='versatilepb'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>arm926</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-armv7l</emulator>
+    <controller type='usb' index='0' model='pci-ohci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.xml b/tests/qemuxmlconfdata/usb-controller-automatic-unavailable-versatilepb.xml
new file mode 120000 (symlink)
index 0000000..2984623
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-automatic-versatilepb.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.args
new file mode 100644 (file)
index 0000000..a05a413
--- /dev/null
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-armv7ltest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-armv7ltest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-armv7ltest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-armv7ltest/.config \
+/usr/bin/qemu-system-armv7l \
+-name guest=armv7ltest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-armv7ltest/master-key.aes"}' \
+-machine versatilepb,usb=off,dump-guest-core=off,memory-backend=versatile.ram \
+-accel tcg \
+-cpu arm926 \
+-m size=1048576k \
+-object '{"qom-type":"memory-backend-ram","id":"versatile.ram","size":1073741824}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-latest.xml
new file mode 100644 (file)
index 0000000..482029e
--- /dev/null
@@ -0,0 +1,27 @@
+<domain type='qemu'>
+  <name>armv7ltest</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='armv7l' machine='versatilepb'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>arm926</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-armv7l</emulator>
+    <controller type='usb' index='0' model='pci-ohci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.xml b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.xml
new file mode 100644 (file)
index 0000000..77cd254
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>armv7ltest</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='armv7l' machine='versatilepb'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-armv7l</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.args
new file mode 100644 (file)
index 0000000..e2cd8cd
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \
+-accel tcg \
+-cpu cortex-a15 \
+-m size=219136k \
+-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":224395264}' \
+-overcommit mem-lock=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,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..7a4ce16
--- /dev/null
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+  <name>test</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='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-aarch64.xml
new file mode 100644 (file)
index 0000000..d299e4c
--- /dev/null
@@ -0,0 +1,12 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.args
new file mode 100644 (file)
index 0000000..cb73962
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-loongarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,acpi=off \
+-accel tcg \
+-cpu la464 \
+-m size=219136k \
+-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":224395264}' \
+-overcommit mem-lock=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,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.loongarch64-latest.xml
new file mode 100644 (file)
index 0000000..9b15378
--- /dev/null
@@ -0,0 +1,23 @@
+<domain type='qemu'>
+  <name>test</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='loongarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>la464</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-loongarch64.xml
new file mode 100644 (file)
index 0000000..9284108
--- /dev/null
@@ -0,0 +1,12 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='loongarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.args
new file mode 100644 (file)
index 0000000..5413ca8
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-riscv64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram,acpi=off \
+-accel tcg \
+-cpu rv64 \
+-m size=219136k \
+-object '{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":224395264}' \
+-overcommit mem-lock=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,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.riscv64-latest.xml
new file mode 100644 (file)
index 0000000..675af30
--- /dev/null
@@ -0,0 +1,24 @@
+<domain type='qemu'>
+  <name>test</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='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.xml b/tests/qemuxmlconfdata/usb-controller-automatic-virt-riscv64.xml
new file mode 100644 (file)
index 0000000..857f441
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.args
new file mode 100644 (file)
index 0000000..63ea7be
--- /dev/null
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \
+-accel tcg \
+-cpu cortex-a15 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.2","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..cea6dde
--- /dev/null
@@ -0,0 +1,43 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0' model='piix3-uhci'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-aarch64.xml
new file mode 120000 (symlink)
index 0000000..733722d
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-aarch64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.args
new file mode 100644 (file)
index 0000000..94e4e87
--- /dev/null
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-loongarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,acpi=off \
+-accel tcg \
+-cpu la464 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.2","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.loongarch64-latest.xml
new file mode 100644 (file)
index 0000000..b7abdaa
--- /dev/null
@@ -0,0 +1,40 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='loongarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>la464</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+    <controller type='usb' index='0' model='pci-ohci'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-loongarch64.xml
new file mode 120000 (symlink)
index 0000000..1fce90c
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-loongarch64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.args
new file mode 100644 (file)
index 0000000..8911094
--- /dev/null
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-riscv64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram,acpi=off \
+-accel tcg \
+-cpu rv64 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.2","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.riscv64-latest.xml
new file mode 100644 (file)
index 0000000..2b77091
--- /dev/null
@@ -0,0 +1,41 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='usb' index='0' model='pci-ohci'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback-virt-riscv64.xml
new file mode 120000 (symlink)
index 0000000..061240f
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-riscv64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-microvm.x86_64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-microvm.x86_64-latest.err
new file mode 100644 (file)
index 0000000..a0ca4fb
--- /dev/null
@@ -0,0 +1 @@
+XML error: No PCI buses available
diff --git a/tests/qemuxmlconfdata/usb-controller-default-microvm.xml b/tests/qemuxmlconfdata/usb-controller-default-microvm.xml
new file mode 100644 (file)
index 0000000..f32966d
--- /dev/null
@@ -0,0 +1,14 @@
+<domain type='qemu'>
+  <name>q35-test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='microvm'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.args b/tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.args
new file mode 100644 (file)
index 0000000..77901f7
--- /dev/null
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-s390x \
+-name guest=guest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
+-accel tcg \
+-cpu qemu \
+-m size=4194304k \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":4294967296}' \
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-s390x.s390x-latest.xml
new file mode 100644 (file)
index 0000000..98b5d46
--- /dev/null
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+    <panic model='s390'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-s390x.xml b/tests/qemuxmlconfdata/usb-controller-default-s390x.xml
new file mode 100644 (file)
index 0000000..f260444
--- /dev/null
@@ -0,0 +1,14 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory>4194304</memory>
+  <vcpu>4</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <controller type='usb' index='0'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.err
new file mode 100644 (file)
index 0000000..cac4e8e
--- /dev/null
@@ -0,0 +1 @@
+internal error: Unable to determine model for USB controller idx=0
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..81ddb4e
--- /dev/null
@@ -0,0 +1,43 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-aarch64.xml
new file mode 120000 (symlink)
index 0000000..733722d
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-aarch64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.err
new file mode 100644 (file)
index 0000000..cac4e8e
--- /dev/null
@@ -0,0 +1 @@
+internal error: Unable to determine model for USB controller idx=0
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.loongarch64-latest.xml
new file mode 100644 (file)
index 0000000..b3f8425
--- /dev/null
@@ -0,0 +1,40 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='loongarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>la464</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-loongarch64.xml
new file mode 120000 (symlink)
index 0000000..1fce90c
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-loongarch64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.err b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.err
new file mode 100644 (file)
index 0000000..cac4e8e
--- /dev/null
@@ -0,0 +1 @@
+internal error: Unable to determine model for USB controller idx=0
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.riscv64-latest.xml
new file mode 100644 (file)
index 0000000..6863634
--- /dev/null
@@ -0,0 +1,41 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.xml b/tests/qemuxmlconfdata/usb-controller-default-unavailable-virt-riscv64.xml
new file mode 120000 (symlink)
index 0000000..061240f
--- /dev/null
@@ -0,0 +1 @@
+usb-controller-default-virt-riscv64.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.args
new file mode 100644 (file)
index 0000000..270f02d
--- /dev/null
@@ -0,0 +1,34 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \
+-accel tcg \
+-cpu cortex-a15 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..94f4776
--- /dev/null
@@ -0,0 +1,39 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0' model='qemu-xhci'>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-aarch64.xml
new file mode 100644 (file)
index 0000000..0f4ba79
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' index='0'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.args
new file mode 100644 (file)
index 0000000..04b70a2
--- /dev/null
@@ -0,0 +1,34 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-loongarch64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,acpi=off \
+-accel tcg \
+-cpu la464 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.loongarch64-latest.xml
new file mode 100644 (file)
index 0000000..0a225e3
--- /dev/null
@@ -0,0 +1,36 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='loongarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>la464</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+    <controller type='usb' index='0' model='qemu-xhci'>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-loongarch64.xml
new file mode 100644 (file)
index 0000000..6322ced
--- /dev/null
@@ -0,0 +1,13 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='loongarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-loongarch64</emulator>
+    <controller type='usb' index='0'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.args
new file mode 100644 (file)
index 0000000..20ef922
--- /dev/null
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-riscv64 \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram,acpi=off \
+-accel tcg \
+-cpu rv64 \
+-m size=2097152k \
+-object '{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":2147483648}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.2","addr":"0x1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.riscv64-latest.xml
new file mode 100644 (file)
index 0000000..28f2c9e
--- /dev/null
@@ -0,0 +1,41 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='usb' index='0' model='piix3-uhci'>
+      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='3' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.xml b/tests/qemuxmlconfdata/usb-controller-default-virt-riscv64.xml
new file mode 100644 (file)
index 0000000..e0d9562
--- /dev/null
@@ -0,0 +1,14 @@
+<domain type='qemu'>
+  <name>test</name>
+  <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='usb' index='0'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index c9dccda7d891f31f9b76cc7ffdd1338d4ba44ac3..f00b5c537b657b5d57344804417179a0ccd3503c 100644 (file)
@@ -2075,9 +2075,48 @@ mymain(void)
     DO_TEST_CAPS_LATEST_PARSE_ERROR("chardev-reconnect-generated-path");
 
     DO_TEST_CAPS_LATEST("usb-controller-automatic-isapc");
+    DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-controller-automatic-microvm");
     DO_TEST_CAPS_LATEST("usb-controller-automatic-i440fx");
     DO_TEST_CAPS_LATEST("usb-controller-automatic-q35");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-pseries", "ppc64");
+    DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("usb-controller-automatic-pseries", "ppc64");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-s390x", "s390x");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-virt-aarch64", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-virt-riscv64", "riscv64");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-virt-loongarch64", "loongarch64");
+
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-versatilepb", "armv7l");
+    DO_TEST_FULL("usb-controller-automatic-unavailable-versatilepb", ".armv7l-latest",
+                 ARG_CAPS_ARCH, "armv7l",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-automatic-realview", "aarch64");
+    DO_TEST_FULL("usb-controller-automatic-unavailable-realview", ".aarch64-latest",
+                 ARG_CAPS_ARCH, "aarch64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
+    DO_TEST_FULL("usb-controller-automatic-unavailable-pseries", ".ppc64-latest",
+                 ARG_CAPS_ARCH, "ppc64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+    DO_TEST_FULL("usb-controller-automatic-unavailable-pseries", ".ppc64-latest.abi-update",
+                 ARG_CAPS_ARCH, "ppc64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
     DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-controller-default-isapc");
+    DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-controller-default-microvm");
     DO_TEST_CAPS_LATEST("usb-controller-default-i440fx");
     DO_TEST_CAPS_LATEST("usb-controller-default-q35");
     DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-pseries", "ppc64");
@@ -2086,6 +2125,21 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-mac99", "ppc64");
     DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-mac99ppc", "ppc");
     DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-powernv9", "ppc64");
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-s390x", "s390x");
+
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-virt-loongarch64", "loongarch64");
+    DO_TEST_FULL("usb-controller-default-fallback-virt-loongarch64", ".loongarch64-latest",
+                 ARG_CAPS_ARCH, "loongarch64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+    DO_TEST_FULL("usb-controller-default-unavailable-virt-loongarch64", ".loongarch64-latest",
+                 ARG_CAPS_ARCH, "loongarch64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
     /* Until qemu-8.1 (see commit 6fe4464c05f) it was possible to compile
      * out USB support from i440fx; the implicit -usb controller still failed */
     DO_TEST_FULL("usb-controller-default-unavailable-i440fx", ".x86_64-latest",
@@ -2118,6 +2172,32 @@ mymain(void)
                  ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
                  ARG_END);
 
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-virt-aarch64", "aarch64");
+    DO_TEST_FULL("usb-controller-default-fallback-virt-aarch64", ".aarch64-latest",
+                 ARG_CAPS_ARCH, "aarch64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+    DO_TEST_FULL("usb-controller-default-unavailable-virt-aarch64", ".aarch64-latest",
+                 ARG_CAPS_ARCH, "aarch64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
+    DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-virt-riscv64", "riscv64");
+    DO_TEST_FULL("usb-controller-default-fallback-virt-riscv64", ".riscv64-latest",
+                 ARG_CAPS_ARCH, "riscv64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+    DO_TEST_FULL("usb-controller-default-unavailable-virt-riscv64", ".riscv64-latest",
+                 ARG_CAPS_ARCH, "riscv64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
     /* controller selection tests for various uncommon machine types */
     DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-versatilepb", "armv7l");
     DO_TEST_FULL("usb-controller-default-fallback-versatilepb", ".armv7l-latest",