- 'virt*' machines already don't allow downgrade
- 'versatilepb' and 'realview' machines use 'pci-ohci' controller
with '-usb'
- all other machines ignore '-usb' (some have sysbus-based USB
controller which we don't even consider)
For the 'versatilepb' and 'realview' machines libvirt would already
resort to picking either an existing controller model or trying to pick
the one which '-usb' would select and thus fail either way.
All other machine types ignore it.
We can thus remove the fallback for all arm-based machines.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 2 +-
...usb-minimal.aarch64-latest.abi-update.args | 1 -
.../aarch64-nousb-minimal.aarch64-latest.args | 1 -
.../arm-vexpressa9-basic.aarch64-latest.args | 1 -
.../arm-vexpressa9-nodevs.aarch64-latest.args | 1 -
.../arm-vexpressa9-virtio.aarch64-latest.args | 1 -
.../disk-arm-virtio-sd.aarch64-latest.args | 1 -
...able-versatilepb-armv7l.armv7l-latest.args | 32 -------------------
...lable-versatilepb-armv7l.armv7l-latest.err | 1 +
tests/qemuxmlconftest.c | 1 +
10 files changed, 3 insertions(+), 39 deletions(-)
delete mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.err
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 16776bb484..2d6f930756 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2924,7 +2924,7 @@ qemuBuildDomainForbidLegacyUSBController(const virDomainDef *def)
{
if (ARCH_IS_X86(def->os.arch) ||
ARCH_IS_PPC(def->os.arch) ||
- qemuDomainIsARMVirt(def) ||
+ ARCH_IS_ARM(def->os.arch) ||
qemuDomainIsRISCVVirt(def))
return true;
diff --git a/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.abi-update.args
b/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.abi-update.args
index dc67ca5f75..a3d0f7a4fc 100644
--- a/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.abi-update.args
+++ b/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.abi-update.args
@@ -25,7 +25,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--usb \
-audiodev
'{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.args
b/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.args
index dc67ca5f75..a3d0f7a4fc 100644
--- a/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.args
+++ b/tests/qemuxmlconfdata/aarch64-nousb-minimal.aarch64-latest.args
@@ -25,7 +25,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--usb \
-audiodev
'{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/arm-vexpressa9-basic.aarch64-latest.args
b/tests/qemuxmlconfdata/arm-vexpressa9-basic.aarch64-latest.args
index 1ffef8383e..72d10a732e 100644
--- a/tests/qemuxmlconfdata/arm-vexpressa9-basic.aarch64-latest.args
+++ b/tests/qemuxmlconfdata/arm-vexpressa9-basic.aarch64-latest.args
@@ -30,7 +30,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-armtest/.config \
-initrd /arm.initrd \
-append 'console=ttyAMA0,115200n8 rw root=/dev/mmcblk0p3 rootwait
physmap.enabled=0' \
-dtb /arm.dtb \
--usb \
-drive file=/arm.raw,format=raw,if=sd,index=0 \
-netdev '{"type":"user","id":"hostnet0"}'
\
-net nic,macaddr=52:54:00:09:a4:37,netdev=hostnet0,model=lan9118,id=net0 \
diff --git a/tests/qemuxmlconfdata/arm-vexpressa9-nodevs.aarch64-latest.args
b/tests/qemuxmlconfdata/arm-vexpressa9-nodevs.aarch64-latest.args
index 86c0d47849..de96ada570 100644
--- a/tests/qemuxmlconfdata/arm-vexpressa9-nodevs.aarch64-latest.args
+++ b/tests/qemuxmlconfdata/arm-vexpressa9-nodevs.aarch64-latest.args
@@ -30,7 +30,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-armtest/.config \
-initrd /arm.initrd \
-append console=ttyAMA0,115200n8 \
-dtb /arm.dtb \
--usb \
-audiodev
'{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/arm-vexpressa9-virtio.aarch64-latest.args
b/tests/qemuxmlconfdata/arm-vexpressa9-virtio.aarch64-latest.args
index 79b569aa38..b4c295be6b 100644
--- a/tests/qemuxmlconfdata/arm-vexpressa9-virtio.aarch64-latest.args
+++ b/tests/qemuxmlconfdata/arm-vexpressa9-virtio.aarch64-latest.args
@@ -31,7 +31,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-armtest/.config \
-append 'console=ttyAMA0,115200n8 rw root=/dev/vda3 rootwait physmap.enabled=0'
\
-dtb /arm.dtb \
-device
'{"driver":"virtio-serial-device","id":"virtio-serial0"}'
\
--usb \
-blockdev
'{"driver":"file","filename":"/arm.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}'
\
-device
'{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}'
\
diff --git a/tests/qemuxmlconfdata/disk-arm-virtio-sd.aarch64-latest.args
b/tests/qemuxmlconfdata/disk-arm-virtio-sd.aarch64-latest.args
index 2572b51f95..3328189b44 100644
--- a/tests/qemuxmlconfdata/disk-arm-virtio-sd.aarch64-latest.args
+++ b/tests/qemuxmlconfdata/disk-arm-virtio-sd.aarch64-latest.args
@@ -30,7 +30,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-armtest/.config \
-initrd /arm.initrd \
-append 'console=ttyAMA0,115200n8 rw root=/dev/vda3 rootwait physmap.enabled=0'
\
-dtb /arm.dtb \
--usb \
-drive file=/arm-sd.qcow2,format=qcow2,if=sd,index=0 \
-drive
file.driver=nbd,file.server.type=inet,file.server.host=localhost,file.server.port=10809,file.export=export,format=qcow2,if=sd,index=1
\
-drive
file.driver=gluster,file.volume=Volume3,file.path=Image.qcow2,file.server.0.type=inet,file.server.0.host=example.org,file.server.0.port=6000,file.server.1.type=inet,file.server.1.host=example.org,file.server.1.port=24007,file.server.2.type=unix,file.server.2.path=/path/to/sock,file.debug=4,format=qcow2,if=sd,index=2
\
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.args
deleted file mode 100644
index d7bad74061..0000000000
---
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.args
+++ /dev/null
@@ -1,32 +0,0 @@
-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 \
--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-default-unavailable-versatilepb-armv7l.armv7l-latest.err
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.err
new file mode 100644
index 0000000000..7a71aa107d
--- /dev/null
+++
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-versatilepb-armv7l.armv7l-latest.err
@@ -0,0 +1 @@
+unsupported configuration: no model provided for USB controller
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index ffe2ad0bd1..f7f533777f 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1921,6 +1921,7 @@ mymain(void)
DO_TEST_FULL("usb-controller-default-unavailable-versatilepb-armv7l",
".armv7l-latest",
ARG_CAPS_ARCH, "armv7l",
ARG_CAPS_VER, "latest",
+ ARG_FLAGS, FLAG_EXPECT_FAILURE,
ARG_QEMU_CAPS_DEL, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_LAST,
ARG_END);
--
2.43.0