All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring.
@ 2012-12-10 16:45 fred.konrad
  2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 1/8] qdev : add a maximum device allowed field for the bus fred.konrad
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: fred.konrad @ 2012-12-10 16:45 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>

You can clone that from here :
git.greensocs.com/home/greensocs/git/qemu_virtio.git virtio_refactoring_v7

These are the two last steps of refactoring ( only for virtio-blk device. ):

    * It modifies virtio-blk-pci to extend virtio-pci and to connect a
      virtio-blk during the initialisation.
    * It modifies virtio-blk ( QOM cast ).

I think the last step is breaking virtio-blk-s390, can somebody confirm that?

If it is breaking virtio-blk-s390 how can I modify it ?

I think it is the right thing to do, and I want to know what do you think before
turning all the remaining virtio-device.

Any feedback ?

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.
    * Modifying virtio-blk-pci to extends virtio-pci and connect a virtio-blk.

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 v6 -> v7:
    * virtio-bus : Added virtio-bus-reset.
    * virtio-pci : Fixed virtio-pci-exit.
    * virtio-pci : Added virtio-pci-rst.
    * virtio-pci : Added VirtioPCIClass filled with an init function.
    * virtio-blk : Added virtio_blk_set_conf.
    * virtio-blk : QOM casts.
    * virtio-blk-pci : Switched to the new API.

Changes v5 -> v6:
    * Renamed virtio_common_init_ to virtio_init, modify virtio_common_init to
      allocate and call virtio_init. Drop the unused structure size parameters.
    * Renamed init/exit callback in VirtioBusClass.
    * Renamed virtio_blk_init virtio_blk_common_init.
    * Modified virtio_blk_init to call virtio_blk_common_init.

Changes v4 -> v5:
    * use ERROR_CLASS_GENERIC_ERROR in place of creating a new error type for
      the maximum device limitation. ( Peter )
    * Removed bus_in_use function. We assume that the virtio-bus is not in use,
      when plugin in. ( Peter )
    * Added virtio_bus_destroy_device().
    * Implemented the exit function of virtio-pci.
    * Implemented the init callback for virtio-pci ( must be modified, it still
      access vdev directly. ).
    * Implemented the exit callback for virtio-pci.
    * Started virtio-device refactoring.
    * Started virtio-blk refactoring. 

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 (8):
  qdev : add a maximum device allowed field for the bus.
  virtio-bus : Introduce virtio-bus
  virtio-pci-bus : Introduce virtio-pci-bus.
  virtio-pci : Refactor virtio-pci device.
  virtio-device : Refactor virtio-device.
  virtio-blk : Add the virtio-blk device.
  virtio-pci-blk : Switch to new API.
  virtio-blk : QOM modifications.

 hw/Makefile.objs  |   1 +
 hw/qdev-core.h    |   2 +
 hw/qdev-monitor.c |  11 +++
 hw/virtio-blk.c   | 140 ++++++++++++++++++++-------
 hw/virtio-blk.h   |   8 ++
 hw/virtio-bus.c   | 120 +++++++++++++++++++++++
 hw/virtio-bus.h   |  83 ++++++++++++++++
 hw/virtio-pci.c   | 277 +++++++++++++++++++++++++++++++++++++++++-------------
 hw/virtio-pci.h   |  52 +++++++++-
 hw/virtio.c       |  50 +++++++---
 hw/virtio.h       |  28 ++++++
 11 files changed, 657 insertions(+), 115 deletions(-)
 create mode 100644 hw/virtio-bus.c
 create mode 100644 hw/virtio-bus.h

-- 
1.7.11.7

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

end of thread, other threads:[~2012-12-16 16:42 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 16:45 [Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 1/8] qdev : add a maximum device allowed field for the bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 2/8] virtio-bus : Introduce virtio-bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 3/8] virtio-pci-bus : Introduce virtio-pci-bus fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 4/8] virtio-pci : Refactor virtio-pci device fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 5/8] virtio-device : Refactor virtio-device fred.konrad
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 6/8] virtio-blk : Add the virtio-blk device fred.konrad
2012-12-11 17:33   ` Peter Maydell
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API fred.konrad
2012-12-11 17:50   ` Peter Maydell
2012-12-13  8:57     ` KONRAD Frédéric
2012-12-12 14:25   ` Peter Maydell
2012-12-12 17:53     ` Andreas Färber
2012-12-12 17:56       ` Paolo Bonzini
2012-12-12 17:58       ` Peter Maydell
2012-12-12 18:03         ` Paolo Bonzini
2012-12-12 21:22           ` Michael S. Tsirkin
2012-12-13  9:37             ` Paolo Bonzini
2012-12-13 14:51           ` Anthony Liguori
2012-12-16 16:01             ` Michael S. Tsirkin
2012-12-13  9:24         ` KONRAD Frédéric
2012-12-16 16:41       ` Andreas Färber
2012-12-13  8:24     ` KONRAD Frédéric
2012-12-13 10:56       ` KONRAD Frédéric
2012-12-10 16:45 ` [Qemu-devel] [RFC PATCH v7 8/8] virtio-blk : QOM modifications fred.konrad
2012-12-11 17:32   ` Peter Maydell
2012-12-11 17:52 ` [Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.