From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1F7q-0007Lo-KL for qemu-devel@nongnu.org; Sat, 15 Nov 2008 01:59:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1F7k-0007LD-1R for qemu-devel@nongnu.org; Sat, 15 Nov 2008 01:59:22 -0500 Received: from [199.232.76.173] (port=58007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1F7j-0007LA-Qr for qemu-devel@nongnu.org; Sat, 15 Nov 2008 01:59:15 -0500 Received: from ozlabs.org ([203.10.76.45]:60227) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1F7j-0003YZ-Dw for qemu-devel@nongnu.org; Sat, 15 Nov 2008 01:59:15 -0500 Date: Sat, 15 Nov 2008 17:45:03 +1100 From: David Gibson Subject: Re: [Qemu-devel] Machine config files Message-ID: <20081115064503.GE6629@yookeroo.seuss> References: <200811140332.14093.paul@codesourcery.com> <200811141539.23408.hollisb@us.ibm.com> <491DF47B.9000602@codemonkey.ws> <200811150013.03865.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811150013.03865.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: devicetree-discuss@ozlabs.org, qemu-devel@nongnu.org, Hollis Blanchard On Sat, Nov 15, 2008 at 12:13:03AM +0000, Paul Brook wrote: > > > 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. > >... > > > 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? > > Things like kernel loading are easy, you just add a special device (which > linux will ignore) specifying the relevant parameters. IMO it should be > possible to use the same device tree for both linux and qemu, but it's ok to > require some additional information on top of what linux currently requires. Depending on exactly what you want to pass through, it may be appropriate to use properties in /chosen for this. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson