mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: command: Don't downgrade to '-usb' for ppc based machines
- '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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
5e84c6c1ce
commit
5b136eba6d
@ -2923,8 +2923,8 @@ static bool
|
|||||||
qemuBuildDomainForbidLegacyUSBController(const virDomainDef *def)
|
qemuBuildDomainForbidLegacyUSBController(const virDomainDef *def)
|
||||||
{
|
{
|
||||||
if (ARCH_IS_X86(def->os.arch) ||
|
if (ARCH_IS_X86(def->os.arch) ||
|
||||||
|
ARCH_IS_PPC(def->os.arch) ||
|
||||||
qemuDomainIsARMVirt(def) ||
|
qemuDomainIsARMVirt(def) ||
|
||||||
qemuDomainIsPSeries(def) ||
|
|
||||||
qemuDomainIsRISCVVirt(def))
|
qemuDomainIsRISCVVirt(def))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -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
|
|
@ -0,0 +1 @@
|
|||||||
|
unsupported configuration: no model provided for USB controller
|
@ -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
|
|
@ -0,0 +1 @@
|
|||||||
|
unsupported configuration: no model provided for USB controller
|
@ -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
|
|
@ -0,0 +1 @@
|
|||||||
|
unsupported configuration: no model provided for USB controller
|
@ -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
|
|
@ -0,0 +1 @@
|
|||||||
|
unsupported configuration: no model provided for USB controller
|
@ -1955,6 +1955,7 @@ mymain(void)
|
|||||||
DO_TEST_FULL("usb-controller-default-unavailable-g3beige", ".ppc64-latest",
|
DO_TEST_FULL("usb-controller-default-unavailable-g3beige", ".ppc64-latest",
|
||||||
ARG_CAPS_ARCH, "ppc64",
|
ARG_CAPS_ARCH, "ppc64",
|
||||||
ARG_CAPS_VER, "latest",
|
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_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
|
||||||
ARG_END);
|
ARG_END);
|
||||||
|
|
||||||
@ -1966,6 +1967,7 @@ mymain(void)
|
|||||||
DO_TEST_FULL("usb-controller-default-unavailable-mac99", ".ppc64-latest",
|
DO_TEST_FULL("usb-controller-default-unavailable-mac99", ".ppc64-latest",
|
||||||
ARG_CAPS_ARCH, "ppc64",
|
ARG_CAPS_ARCH, "ppc64",
|
||||||
ARG_CAPS_VER, "latest",
|
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_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
|
||||||
ARG_END);
|
ARG_END);
|
||||||
|
|
||||||
@ -1977,6 +1979,7 @@ mymain(void)
|
|||||||
DO_TEST_FULL("usb-controller-default-unavailable-mac99ppc", ".ppc-latest",
|
DO_TEST_FULL("usb-controller-default-unavailable-mac99ppc", ".ppc-latest",
|
||||||
ARG_CAPS_ARCH, "ppc",
|
ARG_CAPS_ARCH, "ppc",
|
||||||
ARG_CAPS_VER, "latest",
|
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_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);
|
ARG_END);
|
||||||
|
|
||||||
@ -1988,6 +1991,7 @@ mymain(void)
|
|||||||
DO_TEST_FULL("usb-controller-default-unavailable-powernv9", ".ppc64-latest",
|
DO_TEST_FULL("usb-controller-default-unavailable-powernv9", ".ppc64-latest",
|
||||||
ARG_CAPS_ARCH, "ppc64",
|
ARG_CAPS_ARCH, "ppc64",
|
||||||
ARG_CAPS_VER, "latest",
|
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_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
|
||||||
ARG_END);
|
ARG_END);
|
||||||
DO_TEST_CAPS_LATEST("usb-none");
|
DO_TEST_CAPS_LATEST("usb-none");
|
||||||
|
Loading…
Reference in New Issue
Block a user