From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNxNQ-0006SE-9F for qemu-devel@nongnu.org; Mon, 06 Jul 2009 19:13:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNxNK-0006Ru-Rq for qemu-devel@nongnu.org; Mon, 06 Jul 2009 19:13:34 -0400 Received: from [199.232.76.173] (port=57578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNxNK-0006Rr-HO for qemu-devel@nongnu.org; Mon, 06 Jul 2009 19:13:30 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:48394) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNxNK-0007Bt-BJ for qemu-devel@nongnu.org; Mon, 06 Jul 2009 19:13:30 -0400 Received: by qyk4 with SMTP id 4so2492171qyk.4 for ; Mon, 06 Jul 2009 16:13:29 -0700 (PDT) Message-ID: <4A528516.4020402@codemonkey.ws> Date: Mon, 06 Jul 2009 18:13:26 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 0/4] Machine config files References: <20090610173803.4674.82538.stgit@wren.home> <4A52284C.9080604@redhat.com> <4A523444.30002@codemonkey.ws> <200907062339.43850.paul@codesourcery.com> In-Reply-To: <200907062339.43850.paul@codesourcery.com> 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: Paul Brook Cc: "Michael S. Tsirkin" , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Gerd Hoffmann , Avi Kivity Paul Brook wrote: >> 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. >> > > RAM is part of the machine config, and can be hotplugged[1], so you need at > least that before you start transferring anything. > You really don't. The ram_load_live handler should receive RAM as it comes in and maintain a growable buffer for all the independently transferred regions. A nice property of live migration is that you'll get the whole region at once so something simple based on realloc() will work well. When it comes time to create the virtual machine, you have memory buffers ready to be used as the guest's memory. If it's not sized appropriately, you throw an error and migration aborts. Regards, Anthony Liguori