From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "Torbjörn Andersson" <tobbe.tt@home.se>
Subject: Re: [Qemu-devel] Machine description, an alternativ using XML
Date: Thu, 26 Feb 2009 16:06:06 +0000 [thread overview]
Message-ID: <200902261606.06841.paul@codesourcery.com> (raw)
In-Reply-To: <004601c997de$50cbd7c0$f2638740$@tt@home.se>
> <OBJECT name="pic" class="pl190">
> <ATTRIBUTE name="pic"> <value obj_ref=":cpu"/> </ATTRIBUTE>
> <ATTRIBUTE name="memmap"> <value obj_ref=":memmap"/> </ATTRIBUTE>
> <ATTRIBUTE name="base"> <value integer="0xc0010000"/> </ATTRIBUTE>
> </OBJECT>
> <MACHINE/>
It looks like you're just using XML to encapsulate simple <key,value> pairs,
which IMHO is completely the wrong way to use XML. Qemu already has to know
about things like IO regions, IRQs, bus bindings. XML gives you the power to
describe these things properly, rather than relying on clumsy naming
conventions.
The current device implementations already know two much about this kind of
detail. There's no reason[1] why every device needs to know how to map IO
regions. They should just tell qemu what IO regions they have, and generic
code will sort out the rest. Similarly for IRQs and bus bindings the device
just registers that it provides particular functionality (IRQ source, I2c
master/slave) and doesn't know or care how these are connected. PCI devices
already have some of this abstraction, IMHO we need to go further (e.g. by
removing the map_func callback), and extend this to other systems.
I think one of the most important goals of qemu machine description
infrastructure is to abstract this kind of detail away from the devices.
Paul
[1] Ignoring the VGA hacks, which need to go way anyway.
next prev parent reply other threads:[~2009-02-26 16:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-26 6:49 [Qemu-devel] Machine description, an alternativ using XML Torbjörn Andersson
2009-02-26 16:06 ` Paul Brook [this message]
2009-02-26 20:26 ` SV: " Torbjörn Andersson
2009-02-26 22:14 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2009-02-26 9:36 Jamie Lokier
2009-02-26 12:01 ` Torbjörn Andersson
2009-02-26 13:24 ` Steve Fosdick
2009-02-26 18:48 ` Andreas Färber
2009-02-26 21:47 ` Jamie Lokier
2009-02-26 19:41 ` Blue Swirl
2009-02-26 13:09 Jamie Lokier
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=200902261606.06841.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=tobbe.tt@home.se \
/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).