Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-09 Thread Markus Armbruster
Zhu Guihua zhugh.f...@cn.fujitsu.com writes: On Wed, 2014-10-08 at 10:01 +0200, Paolo Bonzini wrote: Il 08/10/2014 05:49, Zhu Guihua ha scritto: when device_add pc-dimm, only 'memdev' property is necessary, but the 'id' property is optional. So I execute the command as followings:

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-08 Thread Paolo Bonzini
Il 08/10/2014 05:49, Zhu Guihua ha scritto: 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

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-08 Thread Zhu Guihua
On Wed, 2014-10-08 at 10:01 +0200, Paolo Bonzini wrote: Il 08/10/2014 05:49, Zhu Guihua ha scritto: 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

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread 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 +, 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

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Zhu Guihua
On Thu, 2014-10-02 at 10:08 +, 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

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Andreas Färber
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 +, Igor Mammedov wrote: device_add puts every device with 'id' inside of 'peripheral' container using id's value as the last component

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Igor Mammedov
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 +, Igor Mammedov wrote: device_add puts every device

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Zhu Guihua
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

[Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-02 Thread Igor Mammedov
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. Signed-off-by: Igor Mammedov