On Tue, 2014-10-07 at 15:53 +0200, Igor Mammedov wrote: > On Tue, 07 Oct 2014 15:23:45 +0200 > Andreas Färber <afaer...@suse.de> wrote: > > > Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > > > On Tue, 7 Oct 2014 19:59:51 +0800 > > > Zhu Guihua <zhugh.f...@cn.fujitsu.com> wrote: > > > > > >> 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. > > >> 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. > > > > > > What's a use-case for unplugging unnamed device from peripheral-anon? > > > > 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.
when device_add pc-dimm, only 'memdev' property is necessary, but the 'id' property is optional. So I execute the command as followings: object_add memory-backend-ram,id=ram0,size=128M device_add pc-dimm,memdev=ram0 Now it is impossible to delete the pc-dimm, because it has no id, and it is inside of 'peripheral-anon' container. Regards, Zhu > > > > > But that seems orthogonal to this series. > > > > Regards, > > Andreas > > >