From: fred.konrad@greensocs.com
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
e.voevodin@samsung.com, mark.burton@greensocs.com,
stefanha@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de,
fred.konrad@greensocs.com
Subject: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.
Date: Fri, 7 Dec 2012 14:32:29 +0100 [thread overview]
Message-ID: <1354887155-32281-1-git-send-email-fred.konrad@greensocs.com> (raw)
From: KONRAD Frederic <fred.konrad@greensocs.com>
You can clone that from here :
git.greensocs.com/home/greensocs/git/qemu_virtio.git virtio_refactoring_v6
The problem with the last RFC v5 was that virtio-blk refactoring broke
virtio-blk-pci device ( SEGFAULT ). So I modify this last step to fix that
issue.
In order to not break anything, I think we have to refactor virtio-pci-blk in a
next step then add a supplementary step which clean virtio-blk
( eg : fix the cast ).
Does it make sense ?
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 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 (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 : Refactor virtio-pci device.
virtio-device : Refactor virtio-device.
virtio-blk : Add the virtio-blk device.
hw/Makefile.objs | 1 +
hw/qdev-core.h | 2 +
hw/qdev-monitor.c | 11 ++++
hw/virtio-blk.c | 101 ++++++++++++++++++++++++++++++++----
hw/virtio-blk.h | 4 ++
hw/virtio-bus.c | 111 ++++++++++++++++++++++++++++++++++++++++
hw/virtio-bus.h | 82 ++++++++++++++++++++++++++++++
hw/virtio-pci.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/virtio-pci.h | 33 +++++++++++-
hw/virtio.c | 50 ++++++++++++++----
hw/virtio.h | 28 ++++++++++
11 files changed, 550 insertions(+), 22 deletions(-)
create mode 100644 hw/virtio-bus.c
create mode 100644 hw/virtio-bus.h
--
1.7.11.7
next reply other threads:[~2012-12-07 13:32 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 13:32 fred.konrad [this message]
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 1/6] qdev : add a maximum device allowed field for the bus fred.konrad
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 2/6] virtio-bus : Introduce virtio-bus fred.konrad
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 3/6] virtio-pci-bus : Introduce virtio-pci-bus fred.konrad
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 4/6] virtio-pci : Refactor virtio-pci device fred.konrad
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 5/6] virtio-device : Refactor virtio-device fred.konrad
2012-12-07 13:32 ` [Qemu-devel] [RFC PATCH v6 6/6] virtio-blk : Add the virtio-blk device fred.konrad
2012-12-07 14:53 ` Peter Maydell
2012-12-17 15:45 ` [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring Michael S. Tsirkin
2012-12-17 17:13 ` KONRAD Frédéric
2012-12-17 20:46 ` Michael S. Tsirkin
2012-12-18 10:33 ` Peter Maydell
2012-12-18 11:01 ` Michael S. Tsirkin
2012-12-18 11:26 ` Peter Maydell
2012-12-18 11:50 ` Paolo Bonzini
2012-12-18 12:06 ` Peter Maydell
2012-12-18 13:10 ` Michael S. Tsirkin
2012-12-18 14:00 ` Peter Maydell
2012-12-18 14:36 ` Paolo Bonzini
2012-12-18 14:56 ` Peter Maydell
2012-12-18 14:59 ` Paolo Bonzini
2012-12-18 15:42 ` Michael S. Tsirkin
2012-12-18 15:14 ` Michael S. Tsirkin
2012-12-18 14:51 ` Michael S. Tsirkin
2012-12-18 11:30 ` KONRAD Frédéric
2012-12-18 13:21 ` Michael S. Tsirkin
2013-01-07 20:12 ` Anthony Liguori
2013-01-07 20:59 ` Michael S. Tsirkin
2013-01-07 21:24 ` Anthony Liguori
2013-01-07 21:37 ` Michael S. Tsirkin
2013-01-07 21:51 ` Anthony Liguori
2013-01-07 22:15 ` Michael S. Tsirkin
2013-01-07 22:50 ` Anthony Liguori
2013-01-08 6:46 ` Michael S. Tsirkin
2013-01-07 22:16 ` Michael S. Tsirkin
2013-01-07 19:58 ` Michael S. Tsirkin
2013-01-07 20:02 ` Peter Maydell
2013-01-07 20:49 ` Michael S. Tsirkin
2013-01-07 21:32 ` Anthony Liguori
2013-01-07 20:14 ` Anthony Liguori
2013-01-08 9:56 ` KONRAD Frédéric
2013-01-08 14:02 ` Michael S. Tsirkin
2013-01-08 14:27 ` KONRAD Frédéric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354887155-32281-1-git-send-email-fred.konrad@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=e.voevodin@samsung.com \
--cc=mark.burton@greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).