From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/7] ARM: KVM: move to a KVM provided HYP idmap
Date: Wed, 03 Apr 2013 10:46:27 +0100 [thread overview]
Message-ID: <515BFA73.6070804@arm.com> (raw)
In-Reply-To: <20130403094334.GB11040@mudshark.cambridge.arm.com>
On 03/04/13 10:43, Will Deacon wrote:
> On Tue, Apr 02, 2013 at 02:25:11PM +0100, Marc Zyngier wrote:
>> After the HYP page table rework, it is pretty easy to let the KVM
>> code provide its own idmap, rather than expecting the kernel to
>> provide it. It takes actually less code to do so.
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm•com>
>> ---
>> arch/arm/include/asm/idmap.h | 1 -
>> arch/arm/include/asm/kvm_mmu.h | 1 -
>> arch/arm/kvm/mmu.c | 24 +++++++++++++++++++++++-
>> arch/arm/mm/idmap.c | 31 +------------------------------
>> 4 files changed, 24 insertions(+), 33 deletions(-)
>
> [...]
>
>> diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c
>> index 5ee505c..9c467d0 100644
>> --- a/arch/arm/mm/idmap.c
>> +++ b/arch/arm/mm/idmap.c
>> @@ -83,37 +83,10 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start,
>> } while (pgd++, addr = next, addr != end);
>> }
>>
>> -#if defined(CONFIG_ARM_VIRT_EXT) && defined(CONFIG_ARM_LPAE)
>> -pgd_t *hyp_pgd;
>> -
>> -extern char __hyp_idmap_text_start[], __hyp_idmap_text_end[];
>> -
>> -static int __init init_static_idmap_hyp(void)
>> -{
>> - hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL);
>> - if (!hyp_pgd)
>> - return -ENOMEM;
>> -
>> - pr_info("Setting up static HYP identity map for 0x%p - 0x%p\n",
>> - __hyp_idmap_text_start, __hyp_idmap_text_end);
>> - identity_mapping_add(hyp_pgd, __hyp_idmap_text_start,
>> - __hyp_idmap_text_end, PMD_SECT_AP1);
>> -
>> - return 0;
>> -}
>> -#else
>> -static int __init init_static_idmap_hyp(void)
>> -{
>> - return 0;
>> -}
>> -#endif
>> -
>> extern char __idmap_text_start[], __idmap_text_end[];
>>
>> static int __init init_static_idmap(void)
>> {
>> - int ret;
>> -
>> idmap_pgd = pgd_alloc(&init_mm);
>> if (!idmap_pgd)
>> return -ENOMEM;
>> @@ -123,12 +96,10 @@ static int __init init_static_idmap(void)
>> identity_mapping_add(idmap_pgd, __idmap_text_start,
>> __idmap_text_end, 0);
>>
>> - ret = init_static_idmap_hyp();
>> -
>> /* Flush L1 for the hardware to see this page table content */
>> flush_cache_louis();
>>
>> - return ret;
>> + return 0;
>> }
>> early_initcall(init_static_idmap);
>
> You can probably kill off the #include <asm/virt.h> from this file too,
> although I can't immediately see why it's needed anyway.
It should never have been there the first place! I'll get rid of it in v2.
> If that works out,
>
> Acked-by: Will Deacon <will.deacon@arm•com>
Thanks!
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2013-04-03 9:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 13:25 [PATCH 0/7] ARM: KVM: Revamping the HYP init code for fun and profit Marc Zyngier
2013-04-02 13:25 ` [PATCH 1/7] ARM: KVM: simplify HYP mapping population Marc Zyngier
2013-04-03 23:13 ` Christoffer Dall
2013-04-04 12:35 ` Marc Zyngier
2013-04-02 13:25 ` [PATCH 2/7] ARM: KVM: fix HYP mapping limitations around zero Marc Zyngier
2013-04-03 23:14 ` Christoffer Dall
2013-04-04 12:40 ` Marc Zyngier
2013-04-02 13:25 ` [PATCH 3/7] ARM: KVM: move to a KVM provided HYP idmap Marc Zyngier
2013-04-03 9:43 ` Will Deacon
2013-04-03 9:46 ` Marc Zyngier [this message]
2013-04-03 23:14 ` Christoffer Dall
2013-04-02 13:25 ` [PATCH 4/7] ARM: KVM: enforce page alignment for identity mapped code Marc Zyngier
2013-04-03 9:50 ` Will Deacon
2013-04-03 10:00 ` Marc Zyngier
2013-04-03 23:15 ` Christoffer Dall
2013-04-04 10:47 ` Marc Zyngier
2013-04-04 15:32 ` Christoffer Dall
2013-04-02 13:25 ` [PATCH 5/7] ARM: KVM: parametrize HYP page table freeing Marc Zyngier
2013-04-03 23:15 ` Christoffer Dall
2013-04-02 13:25 ` [PATCH 6/7] ARM: KVM: switch to a dual-step HYP init code Marc Zyngier
2013-04-03 10:07 ` Will Deacon
2013-04-03 10:38 ` Marc Zyngier
2013-04-03 23:15 ` Christoffer Dall
2013-04-04 11:05 ` Marc Zyngier
2013-04-03 23:15 ` Christoffer Dall
2013-04-04 12:52 ` Marc Zyngier
2013-04-04 22:10 ` Geoff Levand
2013-04-05 9:08 ` Marc Zyngier
2013-04-05 16:46 ` Geoff Levand
2013-04-05 16:54 ` Marc Zyngier
2013-04-18 15:54 ` Russell King - ARM Linux
2013-04-18 16:01 ` Marc Zyngier
2013-04-02 13:25 ` [PATCH 7/7] ARM: KVM: perform HYP initilization for hotplugged CPUs Marc Zyngier
2013-04-03 23:16 ` Christoffer Dall
2013-04-03 23:18 ` [PATCH 0/7] ARM: KVM: Revamping the HYP init code for fun and profit Christoffer Dall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515BFA73.6070804@arm.com \
--to=marc.zyngier@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox