From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTG7e-0000a9-9t for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:01:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTG7Y-0005Em-AB for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:01:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTG7Y-0005Ei-1V for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:01:00 -0400 Date: Tue, 30 Oct 2012 14:00:42 -0400 From: Jason Baron Message-ID: <20121030180042.GD2744@redhat.com> References: <66b81e2e5ffe78ac446fe4ba0a28e748595b7bf6.1351561225.git.jbaron@redhat.com> <508F74F2.4060204@redhat.com> <20121030151923.GB2744@redhat.com> <508FFDF5.6070901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <508FFDF5.6070901@redhat.com> Subject: Re: [Qemu-devel] [PATCH v1 12/13] q35: fill in usb pci slots with -usb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: aliguori@us.ibm.com, alex.williamson@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, agraf@suse.de, blauwirbel@gmail.com, yamahata@valinux.co.jp, juzhang@redhat.com, kevin@koconnor.net, avi@redhat.com, gsomlo@gmail.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, armbru@redhat.com On Tue, Oct 30, 2012 at 05:19:01PM +0100, Gerd Hoffmann wrote: > On 10/30/12 16:19, Jason Baron wrote: > > On Tue, Oct 30, 2012 at 07:34:26AM +0100, Gerd Hoffmann wrote: > >> Hi, > >> > >>> + uhci_devname[sizeof(uhci_devname) - 2] = ((char)'1') + i; > >> > >> snprintf(devname, sizeof(devname), "...%d", i) is more readable. > > > > ok. > > > >> > >>> + qdev_prop_set_string(usb_qdev, "masterbus", "ich9-usb-bus.0"); > >> > >> Any reason why you rename the usb bus? > >> > > > > I wasn't sure if the user created usb devices on the command-line via > > -device if that would break naming here. Thus, I added a 'private' name. > > If the naming is stable, that works. It would be 'usb-bus.0', in that > > case? > > "usb.0" would be the default name, but you don't need to know it, you > can just look up what qdev created. See here: > > http://www.kraxel.org/cgit/qemu/commit/?h=rebase/usb-next&id=70b9867011c4793787c5acee3d2005a6bc951f59 yes, much better :) > > [ This is part of the "usb patch queue" patch series posted today, > depending on how the qom discussions go and how fast it goes in > you might just call the function the patch provides. Or do > something simliar in pc_q35.c and I'll drop the patch. ] > > -usb for -M pc creates a "usb.0" bus too, so I don't expect trouble. > I think your patch, is a generally useful helper function. Thus, I plan to incorporate something similar to your patch, but less general in pc_q35.c. So usb can get testing, and when your patch lands I will drop the extra usb bits in pc_q35.c. Thanks, -Jason