On Thu, 25 Sep 2014 15:11:10 +0200 Igor Mammedov <imamm...@redhat.com> wrote:
> On Thu, 25 Sep 2014 13:08:38 +0200 > Cornelia Huck <cornelia.h...@de.ibm.com> wrote: > > So, to summarize, what happened before was > > > > bridge device <--- (simple unplug invoked for dev) > simple unplug should not exits for above device Yes. I'm not sure why it does. > > > -> virtual bus > > -> virtio proxy device <--- virtio unplug invoked for dev > > > -> virtio bus > > -> virtio device > > > > which your patch changed to > > > > bridge device > > -> virtual bus <--- simple unplug invoked for virtio proxy dev > > -> virtio proxy device > > -> virtio bus <--- (virtio unplug invoked for virtio dev) > > -> virtio device > > > > Am I understanding this correctly? > Let's try other way around: > > bridge device (virtual_css_bridge) - non hotpluggable sysbus device > -> virtual bus (VIRTUAL_CSS_BUS) > -> virtio proxy device | > -> virtio bus |- virtio_ccw_device_foo composite device managed > with > -> virtio device | device_add/del command > > internal "virtio device" is the only child of "virtio bus" and it's not > supposed > to be managed via device_add/del. This makes sense; I'm wondering why virtio-bus had allow_hotplug set before, though. > > So to unplug "virtio proxy device" we should call virtio_ccw_busdev_unplug > stored in "bridge device" with "virtual bus" using bridge as hotplug-handler. > > does following patch work for you? It does react as expected with a simple device_add/device_del (your patches applied up to patch 19 with this one on top).