[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Machine description, an alternativ using XML
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] Machine description, an alternativ using XML |
Date: |
Thu, 26 Feb 2009 16:06:06 +0000 |
User-agent: |
KMail/1.9.9 |
> <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.
Re: [Qemu-devel] Machine description, an alternativ using XML, Jamie Lokier, 2009/02/26