From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lcika-0000Ce-AX for qemu-devel@nongnu.org; Thu, 26 Feb 2009 11:06:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LcikY-0000CC-Hp for qemu-devel@nongnu.org; Thu, 26 Feb 2009 11:06:15 -0500 Received: from [199.232.76.173] (port=43817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LcikY-0000C8-FK for qemu-devel@nongnu.org; Thu, 26 Feb 2009 11:06:14 -0500 Received: from mx20.gnu.org ([199.232.41.8]:26670) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LcikX-0006Rr-D9 for qemu-devel@nongnu.org; Thu, 26 Feb 2009 11:06:14 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LcikU-0004JP-NS for qemu-devel@nongnu.org; Thu, 26 Feb 2009 11:06:11 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Machine description, an alternativ using XML Date: Thu, 26 Feb 2009 16:06:06 +0000 References: <004601c997de$50cbd7c0$f2638740$@tt@home.se> In-Reply-To: <004601c997de$50cbd7c0$f2638740$@tt@home.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902261606.06841.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: qemu-devel@nongnu.org Cc: =?iso-8859-1?q?Torbj=F6rn_Andersson?= > > > > > > It looks like you're just using XML to encapsulate simple 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.