From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46423 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P987o-0005bA-Em for qemu-devel@nongnu.org; Thu, 21 Oct 2010 23:17:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P987n-0002lw-Cs for qemu-devel@nongnu.org; Thu, 21 Oct 2010 23:17:00 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:51912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P987n-0002lq-5m for qemu-devel@nongnu.org; Thu, 21 Oct 2010 23:16:59 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9M3108r004218 for ; Thu, 21 Oct 2010 23:01:00 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9M3GqrW2396220 for ; Thu, 21 Oct 2010 23:16:55 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9M3Gq4r025898 for ; Thu, 21 Oct 2010 23:16:52 -0400 Date: Thu, 21 Oct 2010 22:16:49 -0500 From: Ryan Harper Subject: Re: [Qemu-devel] [PATCH 0/3] add usb_detach and usb_attach (v3) Message-ID: <20101022031649.GM22904@us.ibm.com> References: <1287642991-21114-1-git-send-email-alevy@redhat.com> <4CC03A2D.9030105@redhat.com> <4CC03C6F.4020304@codemonkey.ws> <20101021132418.GD22958@playa.tlv.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101021132418.GD22958@playa.tlv.redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org * Alon Levy [2010-10-21 08:26]: > On Thu, Oct 21, 2010 at 08:13:19AM -0500, Anthony Liguori wrote: > > On 10/21/2010 08:03 AM, Gerd Hoffmann wrote: > > >On 10/21/10 08:36, Alon Levy wrote: > > >>v2->v3 changes: > > >> * add configure parameter > > >> * fix docs > > >> > > >>v2 message: > > >>This patchset uses id like device_del for attaching/detaching usb > > >>devices. The first two patches ready the way: > > >> 1. makes qdev_find_recursive non static and in qdev.h > > >> 2. adds a usb_device_by_id which goes over the usb buses calling > > >> qdev_find_recursive > > >> 3. adds the commands that use usb_device_by_id > > >> > > >>Alon Levy (3): > > >> qdev: make qdev_find_recursive public > > >> usb: add public usb_device_by_id > > >> monitor: add usb_attach and usb_detach (v2) > > >> > > > > > >Acked-by: Gerd Hoffmann > > > > Okay, I am still confused about the use-case for this and I don't > > see any further explanation in the commit messages. I've seen > > "debugging" but can you be a bit more specific about which cases > > it's needed for? > > > > I use it for debugging the usb-ccid device. I think it's useful for > any other usb device tests as well. The existing commands are not > good enough to do a remove/insert of a usb device, since deleting > a device also deletes any chardev associated with it, and there is > no monitor command to add a chardev. Also sometimes you don't want > to close the chardev, just have the guest see a removal/reinsert of > the device. > > > This is just adding a HMP command. Is that the right approach or > > was that an unintentional consequence of rebasing post-HMP/QMP > > split? > > > > yes, my bad, I have not used qmp before, I can add the code but no > idea how to test it easily. just walked through this one myself; you can update the qmp-command.hx to refer to the same handler (assuming your handler parses qdict etc). Then to test the QMP interface, I read qemu/QMP/README and ended up using a qmp config file and -reconfig, and then qemu/QMP/qmp-shell Which gives you a HMP like monitor interface where you can execute QMP commands. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com