From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Tna-00083J-Gg for qemu-devel@nongnu.org; Tue, 14 Aug 2012 22:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1TnZ-0008DS-Bp for qemu-devel@nongnu.org; Tue, 14 Aug 2012 22:57:34 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:41227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1TnY-0008DF-Pm for qemu-devel@nongnu.org; Tue, 14 Aug 2012 22:57:33 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Aug 2012 12:56:32 +1000 Date: Wed, 15 Aug 2012 12:57:19 +1000 From: David Gibson Message-ID: <20120815025719.GI8136@truffula.fritz.box> References: <1344307320-25094-1-git-send-email-zhlcindy@linux.vnet.ibm.com> <1344307320-25094-2-git-send-email-zhlcindy@linux.vnet.ibm.com> <502A2C73.9070201@suse.de> <20120814231021.GB8136@truffula.fritz.box> <1344989373.2564.10.camel@pasglop> <20120815014700.GG8136@truffula.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Zhang Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Li Zhang , qemu-ppc@nongnu.org, afaerber@suse.de On Wed, Aug 15, 2012 at 10:50:04AM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 9:47 AM, David Gibson wrote: > > On Wed, Aug 15, 2012 at 09:24:34AM +0800, Li Zhang wrote: > >> On Wed, Aug 15, 2012 at 8:09 AM, Benjamin Herrenschmidt > >> wrote: > >> > On Wed, 2012-08-15 at 09:10 +1000, David Gibson wrote: > >> >> > I see. I will redo this patch. Send out it later. :) > >> >> > Thanks for your comments. > >> >> > >> >> When you do that, please also change the default to make spapr _not_ > >> >> have usb. > >> > > >> > FYI, I originally asked for USB as default ... however it looks like at > >> > this stage the price (performance) is too high so either make it default > >> > to OFF, or make it default to ON if and only if VGA is also enabled. > >> > > >> Got it, I change the default as false, and when VGA is enabled, set > >> USB option as true. > > > > Not quite, actually. The default should depend on VGA, but the > > explicit usb= option should always override that. Having VGA without > > USB would be unusual, but it should be possible if you specify it > > explicitly. > > > Right, explicit usb= option will override the value. > I think we can set the usb option value when no usb option is specified. > For example, we use -machine type=pseries without usb= option. > > I am considering as the following: > > if (vga_enabled) { > set_usb_option(true) > } No, this will override the option given on the command line. > if (usb_enabled(false)) { //If vga is enabled and "-machine > type=pseries" is specified, it will get true. > pci_create_simple(ohci) > } It's much easier than this, you just want if (usb_enabled(vga_enabled)) -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson