From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v4 02/14] ARM: Section based HYP idmap Date: Mon, 19 Nov 2012 08:25:52 -0600 Message-ID: <50AA4170.7010905@gmail.com> References: <20121110154203.2836.46686.stgit@chazy-air> <20121110154224.2836.21775.stgit@chazy-air> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Marc Zyngier , Marcelo Tosatti , Will Deacon To: Christoffer Dall Return-path: Received: from mail-ob0-f174.google.com ([209.85.214.174]:55212 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358Ab2KSO0A (ORCPT ); Mon, 19 Nov 2012 09:26:00 -0500 Received: by mail-ob0-f174.google.com with SMTP id wc20so4849024obb.19 for ; Mon, 19 Nov 2012 06:25:59 -0800 (PST) In-Reply-To: <20121110154224.2836.21775.stgit@chazy-air> Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2012 09:42 AM, Christoffer Dall wrote: > Add a method (hyp_idmap_setup) to populate a hyp pgd with an > identity mapping of the code contained in the .hyp.idmap.text > section. > > Offer a method to drop this identity mapping through > hyp_idmap_teardown. > > Make all the above depend on CONFIG_ARM_VIRT_EXT and CONFIG_ARM_LPAE. > > Cc: Will Deacon > Reviewed-by: Marcelo Tosatti > Signed-off-by: Marc Zyngier > Signed-off-by: Christoffer Dall > --- > arch/arm/include/asm/idmap.h | 5 ++ > arch/arm/include/asm/pgtable-3level-hwdef.h | 1 > arch/arm/kernel/vmlinux.lds.S | 6 ++ > arch/arm/mm/idmap.c | 74 +++++++++++++++++++++++---- > 4 files changed, 73 insertions(+), 13 deletions(-) > > diff --git a/arch/arm/include/asm/idmap.h b/arch/arm/include/asm/idmap.h > index bf863ed..36708ba 100644 > --- a/arch/arm/include/asm/idmap.h > +++ b/arch/arm/include/asm/idmap.h > @@ -11,4 +11,9 @@ extern pgd_t *idmap_pgd; > > void setup_mm_for_reboot(void); > > +#ifdef CONFIG_ARM_VIRT_EXT > +void hyp_idmap_teardown(pgd_t *hyp_pgd); > +void hyp_idmap_setup(pgd_t *hyp_pgd); > +#endif Minor nit. You don't need ifdefs around declarations. Rob