mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-04 10:23:02 -05:00
qemu: Remove use of piix3-uhci for non-x86
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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"}' \
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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"}' \
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
Reference in New Issue
Block a user