- 'pseries' machines already don't allow downgrade
- 'g3beige' and 'mac99' machines use 'pci-ohci' controller with
'-usb'
- all other machines ignore '-usb'
For 'g3beige' and 'mac99' libvirt already has 'pci-ohci' as
contoller it
would select as one of the options when picking a model, thus it's
impossible to reach situation when '-usb' would be honoured.
All other machine types ignore it.
We can thus remove the fallback for all ppc-based machines.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 2 +-
...ault-unavailable-g3beige.ppc64-latest.args | 33 -------------------
...fault-unavailable-g3beige.ppc64-latest.err | 1 +
...efault-unavailable-mac99.ppc64-latest.args | 33 -------------------
...default-unavailable-mac99.ppc64-latest.err | 1 +
...fault-unavailable-mac99ppc.ppc-latest.args | 32 ------------------
...efault-unavailable-mac99ppc.ppc-latest.err | 1 +
...ult-unavailable-powernv9.ppc64-latest.args | 33 -------------------
...ault-unavailable-powernv9.ppc64-latest.err | 1 +
tests/qemuxmlconftest.c | 4 +++
10 files changed, 9 insertions(+), 132 deletions(-)
delete mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.err
delete mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.err
delete mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.err
delete mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.err
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 19eabb49ca..16776bb484 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2923,8 +2923,8 @@ static bool
qemuBuildDomainForbidLegacyUSBController(const virDomainDef *def)
{
if (ARCH_IS_X86(def->os.arch) ||
+ ARCH_IS_PPC(def->os.arch) ||
qemuDomainIsARMVirt(def) ||
- qemuDomainIsPSeries(def) ||
qemuDomainIsRISCVVirt(def))
return true;
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.args
deleted file mode 100644
index d32243e820..0000000000
--- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.args
+++ /dev/null
@@ -1,33 +0,0 @@
-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 g3beige,usb=off,dump-guest-core=off,memory-backend=ppc_heathrow.ram \
--accel tcg \
--cpu g3 \
--m size=262144k \
--object
'{"qom-type":"memory-backend-ram","id":"ppc_heathrow.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 \
--usb \
--audiodev
'{"id":"audio1","driver":"none"}' \
--device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}'
\
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.err
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.err
new file mode 100644
index 0000000000..7a71aa107d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-g3beige.ppc64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: no model provided for USB controller
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.args
deleted file mode 100644
index 1f025e4dbf..0000000000
--- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.args
+++ /dev/null
@@ -1,33 +0,0 @@
-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 mac99,usb=off,dump-guest-core=off,memory-backend=ppc_core99.ram \
--accel tcg \
--cpu ppc64 \
--m size=262144k \
--object
'{"qom-type":"memory-backend-ram","id":"ppc_core99.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 \
--usb \
--audiodev
'{"id":"audio1","driver":"none"}' \
--device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}'
\
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.err
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.err
new file mode 100644
index 0000000000..7a71aa107d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99.ppc64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: no model provided for USB controller
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.args
deleted file mode 100644
index 8a9bc370af..0000000000
--- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.args
+++ /dev/null
@@ -1,32 +0,0 @@
-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-ppc \
--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 mac99,usb=off,dump-guest-core=off,memory-backend=ppc_core99.ram \
--accel tcg \
--m size=219136k \
--object
'{"qom-type":"memory-backend-ram","id":"ppc_core99.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 \
--usb \
--audiodev
'{"id":"audio1","driver":"none"}' \
--device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}'
\
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.err
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.err
new file mode 100644
index 0000000000..7a71aa107d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-mac99ppc.ppc-latest.err
@@ -0,0 +1 @@
+unsupported configuration: no model provided for USB controller
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.args
deleted file mode 100644
index cde8063582..0000000000
--- a/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.args
+++ /dev/null
@@ -1,33 +0,0 @@
-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 powernv9,usb=off,dump-guest-core=off,memory-backend=pnv.ram \
--accel tcg \
--cpu POWER9 \
--m size=262144k \
--object
'{"qom-type":"memory-backend-ram","id":"pnv.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 \
--usb \
--audiodev
'{"id":"audio1","driver":"none"}' \
--device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}'
\
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.err
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.err
new file mode 100644
index 0000000000..7a71aa107d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-powernv9.ppc64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: no model provided for USB controller
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index bb898a0787..ffe2ad0bd1 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1956,6 +1956,7 @@ mymain(void)
DO_TEST_FULL("usb-controller-default-unavailable-g3beige",
".ppc64-latest",
ARG_CAPS_ARCH, "ppc64",
ARG_CAPS_VER, "latest",
+ ARG_FLAGS, FLAG_EXPECT_FAILURE,
ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
ARG_END);
@@ -1967,6 +1968,7 @@ mymain(void)
DO_TEST_FULL("usb-controller-default-unavailable-mac99",
".ppc64-latest",
ARG_CAPS_ARCH, "ppc64",
ARG_CAPS_VER, "latest",
+ ARG_FLAGS, FLAG_EXPECT_FAILURE,
ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
ARG_END);
@@ -1978,6 +1980,7 @@ mymain(void)
DO_TEST_FULL("usb-controller-default-unavailable-mac99ppc",
".ppc-latest",
ARG_CAPS_ARCH, "ppc",
ARG_CAPS_VER, "latest",
+ ARG_FLAGS, FLAG_EXPECT_FAILURE,
ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST,
ARG_END);
@@ -1989,6 +1992,7 @@ mymain(void)
DO_TEST_FULL("usb-controller-default-unavailable-powernv9",
".ppc64-latest",
ARG_CAPS_ARCH, "ppc64",
ARG_CAPS_VER, "latest",
+ ARG_FLAGS, FLAG_EXPECT_FAILURE,
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_LATEST("usb-none");
--
2.43.0