From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [Xen-devel] [PATCH 2/4] x86, xen: introduce x86_init.mapping.pagetable_reserve Date: Tue, 12 Apr 2011 12:50:35 +0100 Message-ID: <4DA458AB020000780003B107@vpn.id2.novell.com> References: <1302607192-21355-2-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <1302607192-21355-2-git-send-email-stefano.stabellini@eu.citrix.com> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: Stefano Stabellini Cc: mingo@elte.hu, jeremy@goop.org, yinghai@kernel.org, hpa@linux.intel.com, xen-devel@lists.xensource.com, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org, "H. Peter Anvin" List-Id: xen-devel@lists.xenproject.org >>> On 12.04.11 at 13:19, wrote: > diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c > index 6b833db..fec8680 100644 > --- a/arch/x86/xen/mmu.c > +++ b/arch/x86/xen/mmu.c > @@ -1275,6 +1275,20 @@ static __init void xen_pagetable_setup_start(pgd_t > *base) > { > } > > +static __init void xen_mapping_pagetable_reserve(u64 start, u64 end) > +{ > + /* reserve the range used */ > + memblock_x86_reserve_range(start, end, "PGTABLE"); Wouldn't it be more natural (and involving less future changes) if you called native_pagetable_reserve() here? Jan > + > + /* set as RW the rest */ > + printk(KERN_DEBUG "xen: setting RW the range %llx - %llx\n", end, > + PFN_PHYS(pgt_buf_top)); > + while (end < PFN_PHYS(pgt_buf_top)) { > + make_lowmem_page_readwrite(__va(end)); > + end += PAGE_SIZE; > + } > +} > + > static void xen_post_allocator_init(void); > > static __init void xen_pagetable_setup_done(pgd_t *base)