From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1bsC-0005z8-34 for qemu-devel@nongnu.org; Wed, 15 Aug 2012 07:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1bsA-0007hT-Pl for qemu-devel@nongnu.org; Wed, 15 Aug 2012 07:34:52 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:58826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1bsA-0007hG-7i for qemu-devel@nongnu.org; Wed, 15 Aug 2012 07:34:50 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Aug 2012 21:33:56 +1000 Date: Wed, 15 Aug 2012 21:13:43 +1000 From: David Gibson Message-ID: <20120815111343.GB4171@truffula.fritz.box> References: <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> <20120815025719.GI8136@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 01:44:28PM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 10:57 AM, David Gibson wrote: > > 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. > Oh, I didn't realize that. > > > >> 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)) > This is better than mine. :) > It seems that this patch needs to work with VGA patch together. :) > I need to modify as that. :) Not necessarily. In the initial usb pach you can just make the default 'false', then just change that one line in the VGA patch. -- 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