From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MO2jM-0005Og-LA for qemu-devel@nongnu.org; Tue, 07 Jul 2009 00:56:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MO2jH-0005OL-V1 for qemu-devel@nongnu.org; Tue, 07 Jul 2009 00:56:36 -0400 Received: from [199.232.76.173] (port=49383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MO2jH-0005OI-QG for qemu-devel@nongnu.org; Tue, 07 Jul 2009 00:56:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50939) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MO2jG-00031E-N5 for qemu-devel@nongnu.org; Tue, 07 Jul 2009 00:56:31 -0400 Message-ID: <4A52D564.6070600@redhat.com> Date: Tue, 07 Jul 2009 07:56:04 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files References: <20090610173803.4674.82538.stgit@wren.home> <878wjx374h.fsf@pike.pond.sub.org> <4A3269C3.3050307@redhat.com> <4A327E2C.1060207@siemens.com> <20090706124928.GB11998@redhat.com> <4A51FF7B.4000602@redhat.com> <20090706135616.GA12141@redhat.com> <20090706140129.GB12141@redhat.com> <4A520CC6.7060802@redhat.com> <4A52226C.8060606@redhat.com> <4A5225D6.8030102@redhat.com> <4A52284C.9080604@redhat.com> <4A523444.30002@codemonkey.ws> In-Reply-To: <4A523444.30002@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , "Michael S. Tsirkin" , Gerd Hoffmann , Markus Armbruster , qemu-devel@nongnu.org On 07/06/2009 08:28 PM, Anthony Liguori wrote: > Avi Kivity wrote: >> >>> That alone will *not* provide the position in the device tree >>> though. And I suspect making the transition without breaking >>> backward compatibility could be quite tricky too. So I'm not sure >>> how useful that actually is, although it surely would be much >>> cleaner from a design point of view. >> >> I think we need to break the format. It's semi-broken anyway wrt >> hotplug and the use of ram addresses. It may be possible to add >> transition code but I don't think it's worth it. > > The format is fine. ram v3 uses ram_addr_t because it's was the only > sane thing to do at the time. v4 could easily use target_phys_t. IMO the flat format currently used is fragile wrt. hotplug, as is the requirement to start qemu with exactly the same parameters. If we serialize the state from the current qdev configuration we don't depend on any implementation ordering. > Most importantly, machine config should not be sent until non-live > migration kicks in. At this point, the device tree is stable because > the guest isn't running. The device tree should be the first section > saved for non-live migration. Memory layout depends on the machine configuration. RAM, hotplug RAM, and framebuffers. It would get worse if more components migrate live (disks?). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.