From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbVCq-0008FG-1D for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:53:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbVCl-0001Vn-Ba for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:53:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbVCl-0001VV-2j for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:53:31 -0400 Date: Tue, 7 Oct 2014 15:53:21 +0200 From: Igor Mammedov Message-ID: <20141007155321.36f9a3a7@nial.usersys.redhat.com> In-Reply-To: <5433E961.6010207@suse.de> References: <1411723721-20484-1-git-send-email-imammedo@redhat.com> <1412244525-7153-1-git-send-email-imammedo@redhat.com> <1412683191.18043.7.camel@G08FNSTD140041> <20141007141018.546296f2@nial.usersys.redhat.com> <5433E961.6010207@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: pbonzini@redhat.com, Zhu Guihua , Bharata B Rao , Peter Crosthwaite , qemu-devel@nongnu.org On Tue, 07 Oct 2014 15:23:45 +0200 Andreas F=E4rber wrote: > Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > > On Tue, 7 Oct 2014 19:59:51 +0800 > > Zhu Guihua wrote: > >=20 > >> On Thu, 2014-10-02 at 10:08 +0000, Igor Mammedov wrote: > >>> device_add puts every device with 'id' inside of 'peripheral' > >>> container using id's value as the last component name. > >>> Use it by replacing recursive search on sysbus with path > >>> lookup in 'peripheral' container, which could handle both > >>> BUS and BUS-less device cases. > >>> > >> > >> If I want to delete device without id inside of 'peripheral-anon' > >> container, the command 'device_del' does not work.=20 > >> My suggestion is deleting device by the last component name, is this > >> feasiable? > > So far device_del was designed to work only with id-ed devices. > >=20 > > What's a use-case for unplugging unnamed device from peripheral-anon? >=20 > I can think of use cases where you may want to balloon memory or CPUs. yep currently initial CPUs are created without dev->id and even without device_add help. However if/when it's switched to device_add we can make them use auto-generated IDs so they would go into peripheral section. That would let us keep peripheral-anon for devices that shouldn't be unplugged. >=20 > But that seems orthogonal to this series. >=20 > Regards, > Andreas >=20