Received: from eggs.gnu.org ([2001:4830:134:3::10]:54376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxmY-0002vv-IC for qemu-devel@nongnu.org; Thu, 27 Aug 2015 10:03:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUxmV-0008Il-D0 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 10:03:58 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:36480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxmV-0008I7-9o for qemu-devel@nongnu.org; Thu, 27 Aug 2015 10:03:55 -0400 Received: by qkda128 with SMTP id a128so10728513qkd.3 for ; Thu, 27 Aug 2015 07:03:54 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <20150827135448.GU24486@redhat.com> Date: Thu, 27 Aug 2015 10:03:50 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <29C62C49-06A5-4F99-8062-7269A28C29A3@gmail.com> <8737z7o85i.fsf@blackfin.pond.sub.org> <20150826172834.GQ21787@redhat.com> <20150826175359.GA4528@redhat.com> <20150827135448.GU24486@redhat.com> Subject: Re: [Qemu-devel] Should we auto-generate IDs? (was: [PATCH] qdev-monitor.c: Add device id generation) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , qemu-devel qemu-devel , Paolo Bonzini , =?iso-8859-1?Q?Andreas_F=E4rber?= On Aug 27, 2015, at 9:54 AM, Daniel P. Berrange wrote: > On Wed, Aug 26, 2015 at 02:01:41PM -0400, Programmingkid wrote: >>> If a user is talking to the QEMU monitor directly there are plenty = of ways >>> to go wrong, of which forgetting to provide an ID is a really minor = one. >>=20 >> What other problems did you have in mind? >>=20 >>> That's why it is generally left to higher level mgmt layers to talk = to >>> QEMU and deal with all the issues in this area. IOW if users are = talking >>> to the monitor directly, IMHO they've already lost. >>=20 >> I'm not following you. What do you mean by higher level mgmt layers? >=20 > Using QEMU via libvirt, or a similar management layer and not try > to talk to the monitor and/or CLI args which are complex to get > right and not really designed for user friendliness in general. >=20 >> Let me put it this way, if a user were to add a usb device to QEMU, = say >> a usb-mouse, but forgot to give it an ID. How do you expect that user = to >> remove the device from QEMU? >=20 > object_del should be made to accept the QOM object path, eg the first > anonymous device appears with a path = /machine/peripheral-anon/device[0] > so you could just do 'object_del /machine/peripheral-anon/device[0]' >=20 > If people really want pretty short IDs, then they can remember to > specify them upfront, or use a higher level app that avoids this > kind of problem. That seems a bit unforgiving. It is 2015. I think we can automate a few = more systems.=20=