Paolo Bonzini 5e96f5d2f8 virtio-bus: cleanup plug/unplug interface
Right now we have these pairs:

- virtio_bus_plug_device/virtio_bus_destroy_device.  The first
  takes a VirtIODevice, the second takes a VirtioBusState

- device_plugged/device_unplug callbacks in the VirtioBusClass
  (here it's just the naming that is inconsistent)

- virtio_bus_destroy_device is not called by anyone (and since
  it calls qdev_free, it would be called by the proxies---but
  then the callback is useless since the proxies can do whatever
  they want before calling virtio_bus_destroy_device)

And there is a k->init but no k->exit, hence virtio_device_exit is
overwritten by subclasses (except virtio-9p).  This cleans it up by:

- renaming the device_unplug callback to device_unplugged

- renaming virtio_bus_plug_device to virtio_bus_device_plugged,
  matching the callback name

- renaming virtio_bus_destroy_device to virtio_bus_device_unplugged,
  removing the qdev_free, making it take a VirtIODevice and calling it
  from virtio_device_exit

- adding a k->exit callback

virtio_device_exit is still overwritten, the next patches will fix that.

Cc: qemu-stable@nongnu.org
Acked-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-12-09 21:46:48 +01:00
2013-11-25 20:35:28 -08:00
2013-11-08 04:33:19 +01:00
2013-11-18 15:57:59 +10:00
2013-11-27 07:53:32 -08:00
2013-11-25 20:36:27 -08:00
2013-10-26 13:01:57 +04:00
2013-10-11 09:34:56 -07:00
2013-09-05 09:40:31 -05:00
2013-10-11 10:52:54 +02:00
2013-10-11 09:34:56 -07:00
2013-11-25 09:49:43 -08:00
2013-11-06 21:47:05 -08:00
2013-11-13 11:48:35 -08:00
2013-11-04 15:39:41 +02:00
2013-10-17 10:10:14 +02:00
2013-09-03 12:25:55 +02:00
2013-10-31 16:58:32 +01:00
2013-09-06 15:25:08 +02:00
2013-11-18 13:45:10 +02:00
2013-09-02 09:08:29 -07:00
2013-10-11 09:34:56 -07:00
2013-09-25 21:23:05 +02:00
2013-11-27 14:02:45 -08:00
2013-10-11 09:34:56 -07:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%