]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Remove use of piix3-uhci for non-x86
authorAndrea Bolognani <abologna@redhat.com>
Fri, 1 Aug 2025 14:34:41 +0000 (16:34 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 6 Oct 2025 09:16:34 +0000 (11:16 +0200)
There are still a couple of scenarios in which we end up
using the Intel-specific piix3-uhci (USB1) controller for
non-x86 guests.

Remove these uses, leaving the generic pci-ohci (USB1)
controller as either the fallback or default for situations
where no better choice can be made.

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>
src/qemu/qemu_domain.c
tests/qemuxmlconfdata/ppc-dtb.ppc-latest.args
tests/qemuxmlconfdata/ppc-dtb.ppc-latest.xml
tests/qemuxmlconfdata/ppc-mac99-minimal.ppc-latest.abi-update.args
tests/qemuxmlconfdata/ppc-mac99-minimal.ppc-latest.abi-update.xml
tests/qemuxmlconfdata/ppc-mac99-minimal.ppc-latest.args
tests/qemuxmlconfdata/ppc-mac99-minimal.ppc-latest.xml
tests/qemuxmlconfdata/ppce500-serial.ppc-latest.args
tests/qemuxmlconfdata/ppce500-serial.ppc-latest.xml
tests/qemuxmlconfdata/usb-controller-default-mac99ppc.ppc-latest.args
tests/qemuxmlconfdata/usb-controller-default-mac99ppc.ppc-latest.xml

index b1a92279a72a8522e29d15c59c31b8c31bea4ee9..b39fabfbb4f3eff3a3c1759358ccd8c1880b23cb 100644 (file)
@@ -4348,9 +4348,7 @@ qemuDomainDefaultUSBControllerModel(const virDomainDef *def,
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_USB_XHCI))
             return VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI;
 
-        /* Allow piix3-uhci and pci-ohci (USB1) as fallback */
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI))
-            return VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
+        /* Allow pci-ohci (USB1) as fallback */
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI))
             return VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
 
@@ -4387,10 +4385,8 @@ qemuDomainDefaultUSBControllerModel(const virDomainDef *def,
     }
 
     /* Most common architectures and machine types have been already
-     * handled above; for the remaining cases, use piix3-uhci or
-     * pci-ohci (USB1) as the most reasonable fallback */
-    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI))
-        return VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
+     * handled above; for the remaining cases, use pci-ohci (USB1)
+     * as the most reasonable fallback */
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI))
         return VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
 
index 8032ad7f0e8f4ad6eef46318936291053fc1cedc..bdc86620c833089c663acb5d47e6d40e85c2d6be 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -initrd /media/ram/ramdisk \
 -append 'root=/dev/ram rw console=ttyS0,115200' \
 -dtb /media/ram/test.dtb \
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -chardev pty,id=charserial0 \
 -serial chardev:charserial0 \
 -audiodev '{"id":"audio1","driver":"none"}' \
index 400f749eb01d03b65ccc333dfb9cec7c8d37d74e..31fcc3d0531647eb631ee586adbfae47f2c608b6 100644 (file)
@@ -18,7 +18,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
+    <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'/>
index 8600eec328056541c5017b516d2c1b007941f138..9c7c884c83d372ba3df77663d9e68874bca8a8b5 100644 (file)
@@ -25,7 +25,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -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 \
index 215c196fbfc75479840140f3e9ac39eabbe3edf7..633aa684dabe2d2230c3355da8886ef72782fdb6 100644 (file)
@@ -14,7 +14,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
+    <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'/>
index 8600eec328056541c5017b516d2c1b007941f138..9c7c884c83d372ba3df77663d9e68874bca8a8b5 100644 (file)
@@ -25,7 +25,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -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 \
index 215c196fbfc75479840140f3e9ac39eabbe3edf7..633aa684dabe2d2230c3355da8886ef72782fdb6 100644 (file)
@@ -14,7 +14,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
+    <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'/>
index 84abffdc2627b0cfcb5aa572292802a2a98b8eec..21aa64b32321d906d0bb208a84307e97108c12ca 100644 (file)
@@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -kernel /media/ram/uImage \
 -initrd /media/ram/ramdisk \
 -append 'root=/dev/ram rw console=ttyS0,115200' \
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \
 -chardev pty,id=charserial0 \
 -serial chardev:charserial0 \
 -audiodev '{"id":"audio1","driver":"none"}' \
index c6c41d77269b2f8c879f5aef0205f78a60087d24..05076022a3afb36c45677f42bcbe71fa496f6f8d 100644 (file)
@@ -17,7 +17,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
+    <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'/>
index dcb2b49a53e22c6780eab5d42a90aad74f56934c..da5437bc2436b1e987d88dc9bd65916f4886a1ab 100644 (file)
@@ -25,7 +25,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}' \
+-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
index 02cd54d7f71a5b1c1cc3fd92917c7432952d59cc..2fbca012c95a5a00a9778fc0475b8dceb36bf4ad 100644 (file)
@@ -14,7 +14,7 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-ppc</emulator>
-    <controller type='usb' index='0' model='piix3-uhci'>
+    <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'/>