]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
PPC64 prefers to set pci-ohci controller as default USB controller.
authorLi Zhang <zhlcindy@linux.vnet.ibm.com>
Wed, 23 Apr 2014 11:30:42 +0000 (12:30 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 23 Apr 2014 11:44:42 +0000 (12:44 +0100)
Currently, libvirt is using legacy USB controller as default. There
are problems with VGA which can't work correctly with USB Keyboard and
USB Mouse.

While providing -nodefaults, ppc64 should be specifying the usb
controller explicitly in place of using the legacy
controller(-usb). Qemu spapr initialization code when sees "-usb" adds a
USB Keyboard and USB Mouse by default. And libvirt has added a USB
keyboard and USB mouse.

A recent fix in the in qemu VGA code uncoverd this problem, which
resulted in addition of extra keyboard and mouse to the qemu machine.

This patch is to set pci-ohci as USB default controller.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.args

index 8b4a57a43a4bedbf13f15ce9577b2429f3dfa8ef..91367ab38f11f05e8b76fcf69b0729860a8973df 100644 (file)
@@ -8453,7 +8453,8 @@ qemuBuildCommandLine(virConnectPtr conn,
                            cont->model == -1 &&
                            !qemuDomainMachineIsQ35(def) &&
                            (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI) ||
-                            def->os.arch == VIR_ARCH_PPC64)) {
+                            (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI) &&
+                             def->os.arch == VIR_ARCH_PPC64))) {
                     if (usblegacy) {
                         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                        _("Multiple legacy USB controllers are "
index 3a21b7683336720588ed6c25ff7ddfaaec807a01..eac7c56b9df8b961fb675e13c86c90bc1225b510 100644 (file)
@@ -3,5 +3,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
 -nographic -nodefconfig -nodefaults \
 -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
--usb -chardev pty,id=charserial0 \
+-device pci-ohci,id=usb,bus=pci,addr=0x1 -chardev pty,id=charserial0 \
 -device spapr-vty,chardev=charserial0,reg=0x30000000