From: Keir Fraser Subject: Re: sparse M2P table Date: Thu, 17 Sep 2009 07:19:35 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" , Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 17/09/2009 06:42, "Jiang, Yunhong" wrote: > I'm working on similar staff also, mainly because of memory hotplug requires > such support. Maybe I can base my work on your work :-) > > 256G is not enough if memory hotplug is enabled. In some platform, user can > set the start address for hotpluged memory and the default value is 1024G. > That means 4M memory will be used for the L3 table entries (1024 * 4K). Jan doesn't mean that the M2P only addresses up to 256G; he means that the M2P itself can be up to 256G in size! I.e., it will be able to address up to 128TB :-) The only structure in Xen that I think doesn't just work with expanding its virtual memory allocation and sparse-mapping is the '1:1 memory mapping'. Because to address such large sparse memory maps, the virtual memory allocation would be too large. So I'm guessing the '1:1 memory map' area will end up divided into say 1TB strips with phys_to_virt() executing a radix-tree lookup to map physical address ranges onto those dynamically-allocated strips. -- Keir