Il 09/12/2013 15:14, Igor Mammedov ha scritto: >> > >> > Makes sense. realize() for the "plug" handler, and qdev_unplug for the >> > unplug handler, I guess. > Just to be sure, I've meant not DEVICE.realize() but each device specific > one.
If it's each specific device, then why should the hotplug handler link be in DeviceState? I think it should be in device_set_realized. > qdev_unplug() might work for now, but I haven't checked all devices that > might use interface and if it would break anything. Ideally it should be > in device's unrealize() complementing realize() part. > > I'd wait till all buses converted to new interface before attempting to > generalize current plug/unplug call pathes though. I agree that adding a default behavior for no link probably requires conversion of all buses. However, looking for the link in the generic code can be done now. Paolo