From: Keir Fraser Subject: Re: x86-64's paging_init() Date: Fri, 01 Sep 2006 16:49:33 +0100 Message-ID: References: <44F8701B.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <44F8701B.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 1/9/06 4:38 pm, "Jan Beulich" wrote: >> Correct. I suggest either a clean BUG_ON() in virt_to_xen_l2e(), or >> allocate-and-map the new l2 in that same function (but raises question of >> how to test the new code path). > > Why in virt_to_xen_l2e()? We likely wouldn't make it there on a system > this big, due to earlier memory corruption. Why? The memory is only discovered and mapped after the e820 map is parsed. The mapping occurs via map_pages_to_xen(). That function discovers the l2e by using virt_to_xen_l2e(). So I think it ought to work. You can test it out by doing a map_pages_to_xen() call on an area of virtual address space that currently has no l2e. Should crash now, and work with the modified virt_to_xen_l2e(). -- Keir > But anyway, I'll try to change the code so the code path won't be entirely > unused (similar to the dom0 page table setup in contruct_dom0()).