Received: from eggs.gnu.org ([2001:4830:134:3::10]:41516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXWrk-0008IQ-C1 for qemu-devel@nongnu.org; Thu, 03 Sep 2015 11:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXWrg-0006NL-VC for qemu-devel@nongnu.org; Thu, 03 Sep 2015 11:55:56 -0400 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:35611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXWrg-0006NG-Qn for qemu-devel@nongnu.org; Thu, 03 Sep 2015 11:55:52 -0400 Received: by qkcj187 with SMTP id j187so23110009qkc.2 for ; Thu, 03 Sep 2015 08:55:52 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <20150903144309.GB19447@localhost.localdomain> Date: Thu, 3 Sep 2015 11:55:50 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <29C62C49-06A5-4F99-8062-7269A28C29A3@gmail.com> <8737z7o85i.fsf@blackfin.pond.sub.org> <441C227A-2CF0-43AE-AC7F-B066708CEABD@gmail.com> <87fv36j9j6.fsf@blackfin.pond.sub.org> <117F603F-1907-4D9A-B5F9-4164A76FBBAF@gmail.com> <20150903144309.GB19447@localhost.localdomain> Subject: Re: [Qemu-devel] Should we auto-generate IDs? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: Kevin Wolf , Markus Armbruster , qemu-devel qemu-devel , Paolo Bonzini , =?iso-8859-1?Q?Andreas_F=E4rber?= On Sep 3, 2015, at 10:43 AM, Jeff Cody wrote: > On Thu, Sep 03, 2015 at 10:34:04AM -0400, Programmingkid wrote: >> It has been over a week since we first started talking about this >> subject. A lot of opinions have been flying around. Does this issue >> look like it is starting to be fixed? I just have to say I don't >> think it has been solved yet. Having device_del use a QOM path does >> not sound very good. It is actually easier and faster for the user >> to restart QEMU with a new ID for some device than to have to look >> up some QOM path. Having a user-friendly system for creating ID's >> should be a priority.=20 >=20 > Please see my v2 patch series (you were CC'ed on it): >=20 >=20 > [PATCH v2 1/2] util - add automated ID generation utility > [PATCH v2 2/2] block: auto-generated node-names >=20 > The first patch is a qemu-wide utility to generate IDs. >=20 > The scheme seems to have some consensus, and a few r-b's (it is > also derived from this conversation thread). >=20 > The second patch is using it in the block layer, for node-names; it > should be trivial to see how to use it for qdev. >=20 > Would you like me to roll a v3, with a qdev patch added in? >=20 > Thanks, > Jeff Yes, thank you for them. The first patch does provide a function that = generates an ID,=20 but it doesn't actually give the ID to anything. A third patch might be = needed that actually puts the id_generate() function to use. I use USB devices = that=20 I would like to be able to remove during QEMU's usage. Any ID generating system would be very useful. In qdev-monitor.c there is a function = called qdev_device_add(). That is where I would use your id_generate() = function.