From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW1ts-0000Ek-9l for qemu-devel@nongnu.org; Fri, 04 Apr 2014 07:03:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WW1td-0007Nt-IV for qemu-devel@nongnu.org; Fri, 04 Apr 2014 07:03:08 -0400 Message-ID: <533E9152.9040709@redhat.com> Date: Fri, 04 Apr 2014 13:02:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <87d2gx8xzi.fsf@abhimanyu.in.ibm.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit 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: Nikunj A Dadhania , qemu-devel@nongnu.org, agraf@suse.com Cc: aik@au1.ibm.com, Mark Wu , qemu-ppc@nongnu.org, =?ISO-8859-15?Q?Andreas_F=E4rber?= 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. Paolo