Received: from eggs.gnu.org ([2001:4830:134:3::10]:48507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW2U7-00020q-DM for qemu-devel@nongnu.org; Fri, 04 Apr 2014 07:40:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WW2Tu-0003L1-EF for qemu-devel@nongnu.org; Fri, 04 Apr 2014 07:40:35 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:58660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW2Tt-0003Js-PF for qemu-devel@nongnu.org; Fri, 04 Apr 2014 07:40:22 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Apr 2014 17:10:17 +0530 From: Nikunj A Dadhania In-Reply-To: <533E9152.9040709@redhat.com> References: <1396544174-8904-1-git-send-email-nikunj@linux.vnet.ibm.com> <533DA210.2010303@redhat.com> <87ppkyxllf.fsf@abhimanyu.in.ibm.com> <533DB876.4080008@redhat.com> <87d2gx8xzi.fsf@abhimanyu.in.ibm.com> <533E9152.9040709@redhat.com> Date: Fri, 04 Apr 2014 17:10:11 +0530 Message-ID: <874n298gro.fsf@abhimanyu.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] spapr: skip adding usb keyboard/mouse in case of -nodefaults List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org, agraf@suse.com Cc: aik@au1.ibm.com, Mark Wu , qemu-ppc@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= Paolo Bonzini writes: > Il 04/04/2014 07:28, Nikunj A Dadhania ha scritto: >>>> >> >>>> >> And -usb is translated to adding "pci-ohci" controller for spapr >>> > >>> > Yeah, but with -nodefaults it's better to use -device directly. >> I think there is special handling for this in vl.c >> >> bool usb_enabled(bool default_usb) >> { >> return qemu_opt_get_bool(qemu_get_machine_opts(), "usb", >> has_defaults && default_usb); >> } >> >> And spapr.c uses this: >> >> if (usb_enabled(spapr->has_graphics)) { >> pci_create_simple(phb->bus, -1, "pci-ohci"); > > Sure. However, I'm saying that it's fine for spapr to make -usb mean > "OHCI, and also keyboard & mouse if there is a VGA card in the system". > > If libvirt used "-device pci-ohci" unconditionally, it would fix the bug > *and* it would ensure that the PCI slot of pci-ohci does not change due > to some other unrelated reason. So I would rather have the fix in libvirt. Sure, let me check this. Thanks, Nikunj