From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 2/4] x86,xen: introduce x86_init.mapping.pagetable_reserve Date: Wed, 13 Apr 2011 11:26:44 -0700 Message-ID: <4DA5EAE4.2060406@linux.intel.com> References: <1302607192-21355-2-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1302607192-21355-2-git-send-email-stefano.stabellini@eu.citrix.com> Sender: linux-kernel-owner@vger.kernel.org To: stefano.stabellini@eu.citrix.com Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com, konrad.wilk@oracle.com, jeremy@goop.org, yinghai@kernel.org, mingo@elte.hu, "H. Peter Anvin" List-Id: xen-devel@lists.xenproject.org On 04/12/2011 04:19 AM, stefano.stabellini@eu.citrix.com wrote: > From: Stefano Stabellini > > Introduce a new x86_init hook called pagetable_reserve that during the > initial memory mapping is used to reserve a range of memory addresses for > kernel pagetable usage. > > On native it just calls memblock_x86_reserve_range while on xen it also > takes care of setting the spare memory previously allocated > for kernel pagetable pages from RO to RW, so that it can be used for > other purposes. > What are the *semantics* of this hook? Hooks are insanely nasty if they are just defined by a particular code flow, as evidenced by the royal mess called paravirt_ops. -hpa