From: Blue Swirl <blauwirbel@gmail.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] New device API
Date: Tue, 5 May 2009 18:56:49 +0300 [thread overview]
Message-ID: <f43fc5580905050856g557fd461i3deaf04e7c6fb744@mail.gmail.com> (raw)
In-Reply-To: <200905051231.09759.paul@codesourcery.com>
On 5/5/09, Paul Brook <paul@codesourcery.com> wrote:
> The attached patch is my attempt at a new internal API for device creation in
> qemu.
>
> The long term goal here is fully dynamic machine construction, i.e. a user
> supplied configuration file/tree rather than the current hardcoded board
> configs.
>
> As a first step towards this, I've implemented an API that allows devices to
> be created and configured without requiring device specific knowledge.
>
> There are two sides to this API. The device side allows a device to
> register/configure functionality (e.g. MMIO regions, IRQs, character devices,
> etc). Most of the infrastructure for this is already present, we just need to
> configure it consistently, rather than on an ad-hoc basis. I expect this API
> to remain largely unchanged[1].
>
> The board side allows creation on configuration of devices. In the medium term
> I expect this to go away, and be replaced by data driven configuration.
>
> I also expect that this device abstraction will let itself to a system bus
> model to solve many of the IOMMU/DMA/address mapping issues that qemu
> currently can't handle.
>
> There are still a few rough edges. Busses aren't handled in a particularly
> consistent way, PCI isn't particularly well integrated, and the
> implementation of things like qdev_get_chardev is an ugly hack mapping onto
> current commandline options. However I believe the device side API is fairly
> solid, and is a necessary prerequisite for fixing the bigger configuration
> problem.
>
> I've converted a bunch of devices, anyone interested in seeing how it fits
> together in practice can pull from
> git://repo.or.cz/qemu/pbrook.git qdev
>
> It you have objections to or suggestion about this approach please speak up
> now, but please bear in ming that this code is still somewhat in flux and the
> caveats mentioned above.
FSF address is old.
About "int" property, I'd use a wider type to support 64 bit properties.
I don't think the ptr property can be used to construct OpenFirmware
properties, because the length of the data is not handled.
What happens if you try to register two devices of the same type, can
you identify them somehow? In OF, this is handed with by adding @ and
address.
next prev parent reply other threads:[~2009-05-05 15:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 11:31 [Qemu-devel] [RFC] New device API Paul Brook
2009-05-05 15:56 ` Blue Swirl [this message]
2009-05-05 16:17 ` Paul Brook
2009-05-05 16:26 ` Blue Swirl
2009-05-05 16:35 ` Paul Brook
2009-05-05 18:22 ` Anthony Liguori
2009-05-05 22:42 ` Edgar E. Iglesias
2009-05-06 0:52 ` Paul Brook
2009-05-06 1:04 ` Paul Brook
2009-05-06 13:35 ` Anthony Liguori
2009-05-09 20:55 ` Anthony Liguori
2009-05-09 21:06 ` Paul Brook
2009-05-10 1:34 ` Anthony Liguori
2009-05-09 22:52 ` malc
2009-05-10 1:35 ` Anthony Liguori
2009-05-10 6:50 ` Andreas Färber
2009-05-10 18:38 ` malc
2009-05-10 1:37 ` Anthony Liguori
2009-05-05 22:25 ` Edgar E. Iglesias
2009-05-08 1:54 ` Zachary Amsden
2009-05-08 11:28 ` Paul Brook
2009-05-08 13:47 ` Anthony Liguori
2009-05-09 1:21 ` Zachary Amsden
2009-05-09 13:36 ` Anthony Liguori
2009-05-08 5:27 ` Marcelo Tosatti
2009-05-08 10:44 ` Paul Brook
2009-05-28 13:53 ` Markus Armbruster
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=f43fc5580905050856g557fd461i3deaf04e7c6fb744@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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).