[Qemu-devel] Machine config files

Anthony Liguori anthony at codemonkey.ws
Sat Nov 15 08:58:19 EST 2008


Hollis Blanchard wrote:
> On Friday 14 November 2008 14:11:32 Anthony Liguori wrote:
>   
> Theoretically, nothing. If qemu were a clean and modular place, it would 
> probably be pretty straightforward.
>
> Some translation code would be required for compatibility. For example, when 
> the DTS has 128MB of memory, and the user invokes qemu with -m 256, now you 
> need to update the device tree in order to pass it into the guest. That's 
> pretty easy, but once you start talking about adding PCI devices it gets a 
> little more difficult. I seem to recall this conversation was had on 
> qemu-devel a little while back.
>   

The way I would expect that it would work is that you could invoke QEMU 
with a device tree or it would by default use a device tree "template".  
The options like '-m' would modify the device tree template.  There's 
probably no need to differentiate between a user supplied device tree 
and a device tree template.

> Of course, *some* code would still be needed *somewhere* to load the kernel, 
> initrd, set initial register state to point to those memory locations, etc. 
> In the case of KVM on 440, we also need to override the DTS with the real 
> host clock frequency. (This probably isn't necessary for qemu+TCG.)
>
> But yes, replacing all the pci_nic_init(), isa_mmio_init(), 
> cpu_register_physical_memory(), etc could be automated by walking the device 
> tree.
>   

Ok.  This is starting to look interesting.  Paul, what do you think of DTS?

Regards,

Anthony Liguori





More information about the devicetree-discuss mailing list