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

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

 



On 03/04/2013 07:47 AM, Li Zhang wrote:
From: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxx>
---
  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...

--

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]