[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/1] Set legacy USB option with default for ppc64.

On 2013年03月13日 02:46, Jiri Denemark wrote:
On Tue, Mar 12, 2013 at 13:34:07 +0100, Viktor Mihajlovski wrote:
On 03/04/2013 07:47 AM, Li Zhang wrote:
From: Li Zhang <zhlcindy linux vnet ibm com>

Currently, -device xxx still can't work well for ppc64 platform.
It's better use legacy USB option with default for ppc64.

This patch is to legacy USB option with default for ppc64.

Signed-off-by: Li Zhang <zhlcindy linux vnet ibm com>
   src/qemu/qemu_command.c |    3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 1c9bfc9..618dfb1 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5783,7 +5783,8 @@ qemuBuildCommandLine(virConnectPtr conn,
                   } else if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
                              cont->model == -1 &&
-                           !virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
+                           (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI) ||
+                            def->os.arch == VIR_ARCH_PPC64)) {
                       if (usblegacy) {
                           virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                          _("Multiple legacy USB controllers are "

For what it is worth: if QEMU's support for -device <usbcontroller> is
broken on PPC, it seems perfectly OK to add special handling.
The patch you have posted will serve the purpose and I do support it.

Another approach would be to clear the problematic capabilities in
qemu_capabilities.c, e.g. in virQEMUCapsInitQMP, which might be
conceptually cleaner. Maybe a libvirt committer wants to comment...
Right, masking the capability from qemuCaps just after it's been probed
is the right approach. That way, all code paths relying on that
capability will stop using it automatically.

Hi Jirka/Victor,

Thanks for your comments.
After investigating QEMU, PIIX3_USB_UHCI is also can work on PPC64.
I have thought that PIIX3 is only for x86. But QEMU still support it for PPC64 which shouldn't be a big issue.
So it's not necessary to disable this capability.

The problem this patch is to resolve:

In libvirt, it will report error when VGA is enabled by -device xxxx for pSeries guest in libvirt.
In QEMU, it requires the option "-machine xx,usb=off" to resolve this error.
Because for pSeries, usb=on as default , and machine_init will create one USB controller. If with -device xxx, it will create another controller. So one conflict occurs.
This should be resolved with another patch which isn't accepted.

Now, only legacy USB ( -usb configuration ) can work correctly with VGA in libvirt.

So this patch supposes -usb as default when no model is specified for PPC64.
If USB device model specified, it still needs that patch as I mentioned above in the future.

Thanks. :)


libvir-list mailing list
libvir-list redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]