Message ID | 20120703085920.27746.12269.stgit@ubuntu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 03.07.2012 10:59, schrieb Christoffer Dall: > From: Marc Zyngier <marc.zyngier@arm.com> > > The KVM hypervisor mmu code requires requires access to the "code requires access" Andreas > mem_type prot_pte field when setting up page tables pointing > to a device. Unfortunately, the mem_type structure is opaque. > > Add an accessor (get_mem_type_prot_pte()) to retrieve the > prot_pte value. > > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> > Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
On Fri, Jul 20, 2012 at 4:54 PM, Andreas Färber <afaerber@suse.de> wrote: > Am 03.07.2012 10:59, schrieb Christoffer Dall: >> From: Marc Zyngier <marc.zyngier@arm.com> >> >> The KVM hypervisor mmu code requires requires access to the > > "code requires access" > thanks, -Christoffer -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index a6efcdd..3787c9f 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h @@ -37,6 +37,7 @@ extern void iotable_init(struct map_desc *, int); struct mem_type; extern const struct mem_type *get_mem_type(unsigned int type); +extern pteval_t get_mem_type_prot_pte(unsigned int type); /* * external interface to remap single page with appropriate type */ diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index e5dad60..f7439e7 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -301,6 +301,12 @@ const struct mem_type *get_mem_type(unsigned int type) } EXPORT_SYMBOL(get_mem_type); +pteval_t get_mem_type_prot_pte(unsigned int type) +{ + return get_mem_type(type)->prot_pte; +} +EXPORT_SYMBOL(get_mem_type_prot_pte); + /* * Adjust the PMD section entries according to the CPU in use. */