From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753856Ab0JMXTT (ORCPT ); Wed, 13 Oct 2010 19:19:19 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41224 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753827Ab0JMXTS (ORCPT ); Wed, 13 Oct 2010 19:19:18 -0400 Message-ID: <4CB63E57.2000300@zytor.com> Date: Wed, 13 Oct 2010 16:18:47 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4 MIME-Version: 1.0 To: Jeremy Fitzhardinge CC: Yinghai Lu , Thomas Gleixner , Ingo Molnar , Benjamin Herrenschmidt , "linux-kernel@vger.kernel.org" , Vivek Goyal Subject: Re: [PATCH 0/4] memblock related fixes for -tip References: <4CAA4DC1.6000104@kernel.org> <4CB4ABE2.3010300@goop.org> <4CB4CF4D.5020706@kernel.org> <4CB4F11F.4090104@goop.org> <4CB54640.4000003@kernel.org> <4CB5DEE8.2020400@goop.org> <4CB5F86C.9030900@zytor.com> <4CB6107F.4080908@goop.org> <4CB62D54.7000400@kernel.org> <4CB63D63.5040500@goop.org> In-Reply-To: <4CB63D63.5040500@goop.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/2010 04:14 PM, Jeremy Fitzhardinge wrote: > > The Xen code is setting the max_pfn_mapped correctly, but it is just > being overridden by: > > max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT; > > in setup_arch() - and KERNEL_IMAGE_SIZE is hard-coded to 512MB... > > How is this correct? Does kernel/head_64.S map everything up to 512MB > or something? > Yes: /* * 512 MB kernel mapping. We spend a full page on this pagetable * anyway. * * The kernel code+data+bss must not be bigger than that. * * (NOTE: at +512MB starts the module area, see MODULES_VADDR. * If you want to increase this then increase MODULES_VADDR * too.) */ PMDS(0, __PAGE_KERNEL_LARGE_EXEC, KERNEL_IMAGE_SIZE/PMD_SIZE) This is, however, wrong in the sense that it obviously shouldn't be getting executed on the Xen codepath. -hpa