qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH V4 0/6] Virtio refactoring.
@ 2012-11-30 17:12 fred.konrad
  2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 1/6] qdev : add a maximum device allowed field for the bus fred.konrad
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: fred.konrad @ 2012-11-30 17:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, aliguori, e.voevodin, mark.burton, stefanha,
	cornelia.huck, afaerber, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

I send this RFC, to know if you're all happy with the current structure of the
device (QOM).

This patch-set is :
    * Introducing a virtio-bus which extends bus-state.
    * Implementing a virtio-pci-bus which extends virtio-bus.
    * Implementing a virtio-pci device which has a virtio-pci-bus.
    * Implementing virtio-device which extends device-states.
    * Implementing a virtio-blk which extends virtio-device.

The first patch is a modification of qdev-monitor.c, it forces the function
qbus_find_recursive(..) to return a non-full bus, and return an error if the
desired bus ( with "bus=" option ) is full. It add a max_dev field to the
bus_state structure. If max_dev=0 it has no limitation, if not the maximum
amount of device connected to the bus is max_dev.

Changes v3 -> v4:
    * Added virtio-bus.o in Makefile.objs ( accidentally dropped from v3 ).
    * *const* TypeInfo in virtio-bus.
    * Introduced virtio-pci-bus.
    * Reintroduced virtio-pci.
    * Introduced virtio-device.
    * Started virtio-blk refactoring.
    * Added an error type in qerror.h for the "bus full" error.

Changes v2 -> v3:
    * Added VirtioBusClass.
    * Renamed VirtioBus -> VirtioBusState.
    * Renamed qbus -> parent_obj.
    * Plug the device only in a non-full bus.

Changes v1 -> v2:
    * All the little fix you suggest ( License, Debug printf, naming convention,
      ...)
    * Added get_virtio_device_id(), and remove the pci_id* from the VirtioBus
      structure.
    * Added virtio_bus_reset().
    * Added cast macros VIRTIO_BUS.
    * Added virtio_bus_plug_device.
    * Replaced the old-style "bus->qbus" by BUS() macro.

Fred.

KONRAD Frederic (6):
  qdev : add a maximum device allowed field for the bus.
  virtio-bus : Introduce virtio-bus
  virtio-pci-bus : Introduce virtio-pci-bus.
  virtio-pci : Introduce virtio-pci device.
  virtio-device : Introduce virtio-device.
  virtio-blk : Refactoring virtio-blk.

 hw/Makefile.objs  |    1 +
 hw/qdev-core.h    |    2 +
 hw/qdev-monitor.c |   11 +++++
 hw/virtio-blk.c   |   61 ++++++++++++++++++++++++++++
 hw/virtio-blk.h   |   16 +++++++
 hw/virtio-bus.c   |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/virtio-bus.h   |   78 ++++++++++++++++++++++++++++++++++++
 hw/virtio-pci.c   |   91 ++++++++++++++++++++++++++++++++++++++++++
 hw/virtio-pci.h   |   34 +++++++++++++++-
 hw/virtio.c       |   28 +++++++++++++
 hw/virtio.h       |   27 ++++++++++++
 qerror.h          |    3 +
 12 files changed, 464 insertions(+), 2 deletions(-)
 create mode 100644 hw/virtio-bus.c
 create mode 100644 hw/virtio-bus.h

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-12-03  9:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-30 17:12 [Qemu-devel] [RFC PATCH V4 0/6] Virtio refactoring fred.konrad
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 1/6] qdev : add a maximum device allowed field for the bus fred.konrad
2012-11-30 18:26   ` Peter Maydell
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 2/6] virtio-bus : Introduce virtio-bus fred.konrad
2012-11-30 18:36   ` Peter Maydell
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 3/6] virtio-pci-bus : Introduce virtio-pci-bus fred.konrad
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 4/6] virtio-pci : Introduce virtio-pci device fred.konrad
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 5/6] virtio-device : Introduce virtio-device fred.konrad
2012-11-30 18:40   ` Peter Maydell
2012-11-30 17:12 ` [Qemu-devel] [RFC PATCH V4 6/6] virtio-blk : Refactoring virtio-blk fred.konrad
2012-11-30 18:42   ` Peter Maydell
2012-11-30 18:43 ` [Qemu-devel] [RFC PATCH V4 0/6] Virtio refactoring Peter Maydell
2012-12-03  9:25   ` KONRAD Frédéric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).