From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN6OO-00007o-Oq for qemu-devel@nongnu.org; Tue, 22 Dec 2009 10:11:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN6OJ-0008WJ-1y for qemu-devel@nongnu.org; Tue, 22 Dec 2009 10:11:19 -0500 Received: from [199.232.76.173] (port=33170 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN6OI-0008W9-Lb for qemu-devel@nongnu.org; Tue, 22 Dec 2009 10:11:14 -0500 Received: from mail-yw0-f171.google.com ([209.85.211.171]:60314) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NN6OG-0002je-BA for qemu-devel@nongnu.org; Tue, 22 Dec 2009 10:11:13 -0500 Received: by ywh1 with SMTP id 1so5841360ywh.18 for ; Tue, 22 Dec 2009 07:11:11 -0800 (PST) Message-ID: <4B30E185.9000408@codemonkey.ws> Date: Tue, 22 Dec 2009 09:11:01 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [SeaBIOS] [PATCH 0/8] option rom loading overhaul. References: <1261134074-11795-1-git-send-email-kraxel@redhat.com> <4B2E3E96.7090708@codemonkey.ws> <4B2E40C7.2080908@redhat.com> <200912221304.42114.paul@codesourcery.com> In-Reply-To: <200912221304.42114.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 , qemu-devel@nongnu.org, Avi Kivity On 12/22/2009 07:04 AM, Paul Brook wrote: >>> We should just qemu_ram_alloc() that memory regardless of whether we >>> every map it into the guest. Since roms can be large, we want to send >>> their contents over during the live part of migration. If we use >>> qemu_ram_alloc(), we get that for free. >>> >> Currently live migration uses ram_addrs, so this would work. But >> ram_addrs have no meaning in the guest and thus depend on qemu >> implementation details. IMO we should switch live migration to use >> guest physical addresses, which would require a different migration >> implementation for roms. Most of it can be shared with ram, though. >> > Ram allocations should be associated with a device. The VMState stuff this > should make this fairly straightforward. > Right, but for the sake of simplicity, you don't want to treat that ram any differently than main ram wrt live migration. That's why I proposed adding a context id for each ram region. That would allow us to use something like the qdev name + id as the context id for a ram chunk to get that association while still doing live ram migration of the memory. > Guest address space mappings are a completely separate issue. The device > should be migrating the mappings (directly or via a PCI BAR) as part of its > state migration. The ram regions might not be mapped into guest address space > at all. > We don't migrate guest address space memory today. We migrate anything that's qemu_ram_alloc()'d. The big problem we have though is that we don't have any real association between the qemu_ram_alloc() results and what the context of the allocation was. We assume the order of these allocations are fixed and that's entirely wrong. For non-device qemu_ram_alloc()'s, we could either create essentially dummy ram devices or we could just special case it. Regards, Anthony Liguori > Paul >