Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Gleb Natapov
On Tue, Jan 08, 2013 at 01:38:48PM -0500, 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

Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Will Deacon
On Mon, Jan 14, 2013 at 10:27:21AM +, Gleb Natapov wrote: On Tue, Jan 08, 2013 at 01:38:48PM -0500, 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

Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Gleb Natapov
On Mon, Jan 14, 2013 at 10:49:53AM +, Will Deacon wrote: On Mon, Jan 14, 2013 at 10:27:21AM +, Gleb Natapov wrote: On Tue, Jan 08, 2013 at 01:38:48PM -0500, Christoffer Dall wrote: Add a method (hyp_idmap_setup) to populate a hyp pgd with an identity mapping of the code contained

Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Russell King - ARM Linux
On Mon, Jan 14, 2013 at 01:07:56PM +0200, Gleb Natapov wrote: Ah, of course. This is ident map so by definition it cannot map phys addresses above 4G. And since __virt_to_phys() suppose to work only on ident map it's OK to returns unsigned long. Let's get this right... the lack of correct

Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Russell King - ARM Linux
On Tue, Jan 08, 2013 at 01:38:48PM -0500, Christoffer Dall wrote: + pr_info(Setting up static %sidentity map for 0x%llx - 0x%llx\n, + prot ? HYP : , + (long long)addr, (long long)end); There's no point using 0x%llx and casting to 64-bit longs if the arguments are

Re: [PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-14 Thread Christoffer Dall
On Mon, Jan 14, 2013 at 11:13 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Tue, Jan 08, 2013 at 01:38:48PM -0500, Christoffer Dall wrote: + pr_info(Setting up static %sidentity map for 0x%llx - 0x%llx\n, + prot ? HYP : , + (long long)addr, (long

[PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-08 Thread Christoffer Dall
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