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 v3 0/2] Introduce virtio-bus.
Date: Tue, 27 Nov 2012 20:53:33 +0100 [thread overview]
Message-ID: <1354046015-12836-1-git-send-email-fred.konrad@greensocs.com> (raw)
From: KONRAD Frederic <fred.konrad@greensocs.com>
As said on IRC, I send only VirtioBus as old implementation of VirtioPCI is not longer making sense after the changes on VirtioBus.
As anthony said, the better way to do this refactoring is :
* Introducing a virtio-bus which extends bus-state.
* Implementing a virtio-pci-bus which extends virtio-bus.
* Implementing virtio-device which extends device-states.
This patch introduce virtio-bus, which is abstract and extends bus-state.
The VirtioBusClass still has init and exit methods, which must be called by the
VirtIODevice, and have all the VirtioBindings methods. The futur virtio-x-bus,
will have to implement this methods to be a virtio-bus.
The second 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 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 (2):
virtio-bus : Introduce virtio-bus
qbus : add a maximum device.
hw/qdev-core.h | 1 +
hw/qdev-monitor.c | 12 +++++
hw/virtio-bus.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/virtio-bus.h | 74 +++++++++++++++++++++++++++++++++
4 files changed, 205 insertions(+), 0 deletions(-)
create mode 100644 hw/virtio-bus.c
create mode 100644 hw/virtio-bus.h
next reply other threads:[~2012-11-27 19:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 19:53 fred.konrad [this message]
2012-11-27 19:53 ` [Qemu-devel] [RFC PATCH v3 1/2] virtio-bus : Introduce virtio-bus fred.konrad
2012-11-27 19:53 ` [Qemu-devel] [RFC PATCH v3 2/2] qbus : add a maximum device fred.konrad
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=1354046015-12836-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).