Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXYn0-00019H-AP for qemu-devel@nongnu.org; Thu, 12 Feb 2009 05:27:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXYmx-00016z-Nw for qemu-devel@nongnu.org; Thu, 12 Feb 2009 05:27:24 -0500 Received: from [199.232.76.173] (port=51468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXYmw-00016a-Fa for qemu-devel@nongnu.org; Thu, 12 Feb 2009 05:27:22 -0500 Received: from mx2.redhat.com ([66.187.237.31]:41895) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LXYmv-0005bn-HP for qemu-devel@nongnu.org; Thu, 12 Feb 2009 05:27:21 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1CARK7u013522 for ; Thu, 12 Feb 2009 05:27:20 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1CARKSW031949 for ; Thu, 12 Feb 2009 05:27:21 -0500 Received: from pike.pond.sub.org (vpn-10-54.str.redhat.com [10.32.10.54]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1CARJwh007051 for ; Thu, 12 Feb 2009 05:27:20 -0500 Subject: Re: [Qemu-devel] [RFC] Machine description as data References: <87iqnh6kyv.fsf@pike.pond.sub.org> <49932089.2050708@codemonkey.ws> <49932D75.3090406@codemonkey.ws> From: Markus Armbruster Date: Thu, 12 Feb 2009 11:25:41 +0100 In-Reply-To: <49932D75.3090406@codemonkey.ws> (Anthony Liguori's message of "Wed\, 11 Feb 2009 13\:56\:37 -0600") Message-ID: <87ljsc0x5m.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Anthony Liguori writes: > Blue Swirl wrote: >> On 2/11/09, Anthony Liguori wrote: >> >>> I think your approach is pretty sound. A few observations: >>> >>> 1) obviously need to eliminate the code duplication Obviously. >>> 2) the new code should fit with the rest of QEMU stylistically Expand tabs. What else? >>> 3) I'd prefer incremental vs. perfect so let's try to do as much >>> refactoring that will be required before actually going the full 9 yards and >>> implementing the config file. >>> >>> 4) we don't have to solve all problems all at once as long as we don't >>> regress existing features Exactly. >> I'd still want to see if a FDT based solution is possible before >> taking a homebrew version. >> > > I think I mentioned earlier that I am heavily bias toward a FDT > solution. What I'm suggesting though is that we can do some of the > required cleanup (like device refactoring) before introducing any of > the tree stuff. I proposed to start with a (hardcoded) tree, because then a lot of tasks become independent. And the work to put device code behind an abstract device interface happens in the right context from the start: driven by tree-structured configuration. That reduces the risk of us solving a similar, but different problem than the one we actually have. Of course, that sets us up for replacing the actual tree data structure. Maybe I'm naive, but how hard could that be? It's just a decorated tree. A bunch of identifiers change, and a few nodes get shuffled around. If you don't want to risk that, I can try to make some progress on the abstract device interface without having a tree.