From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 5/7] ARM: KVM: rework HYP page table freeing
Date: Fri, 26 Apr 2013 12:05:58 +0100 [thread overview]
Message-ID: <20130426110558.GE5007@localhost.cambridge.arm.com> (raw)
In-Reply-To: <1365790327-2138-6-git-send-email-marc.zyngier@arm.com>
On Fri, Apr 12, 2013 at 07:12:05PM +0100, Marc Zyngier wrote:
> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
> index bfc5927..7464824 100644
> --- a/arch/arm/kvm/mmu.c
> +++ b/arch/arm/kvm/mmu.c
...
> +static void clear_pmd_entry(pmd_t *pmd)
> +{
> + pte_t *pte_table = pte_offset_kernel(pmd, 0);
> + pmd_clear(pmd);
> + pte_free_kernel(NULL, pte_table);
> + put_page(virt_to_page(pmd));
> +}
...
> static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size)
Is there a chance that this function (or the other unmapping function
for Hyp pages) is called on an active stage 2 table (VTTBR pointing to
this pgd)? If yes, than you probably have to follow the mmu_gather
mechanism of freeing page table pages to avoid speculative loads.
Basically flushing the TLB between pmd_clear and pte_free_kernel.
--
Catalin
next prev parent reply other threads:[~2013-04-26 11:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 18:12 [PATCH v4 0/7] ARM: KVM: Revamping the HYP init code for fun and profit Marc Zyngier
2013-04-12 18:12 ` [PATCH v4 1/7] ARM: KVM: simplify HYP mapping population Marc Zyngier
2013-04-26 10:45 ` Catalin Marinas
2013-04-26 10:59 ` Marc Zyngier
2013-04-12 18:12 ` [PATCH v4 2/7] ARM: KVM: fix HYP mapping limitations around zero Marc Zyngier
2013-04-12 18:12 ` [PATCH v4 3/7] ARM: KVM: move to a KVM provided HYP idmap Marc Zyngier
2013-04-17 19:37 ` Christoffer Dall
2013-04-18 9:08 ` Will Deacon
2013-04-12 18:12 ` [PATCH v4 4/7] ARM: KVM: enforce maximum size for identity mapped code Marc Zyngier
2013-04-12 18:12 ` [PATCH v4 5/7] ARM: KVM: rework HYP page table freeing Marc Zyngier
2013-04-26 11:05 ` Catalin Marinas [this message]
2013-04-26 16:45 ` Marc Zyngier
2013-04-26 21:07 ` Christoffer Dall
2013-04-27 15:21 ` Catalin Marinas
2013-04-12 18:12 ` [PATCH v4 6/7] ARM: KVM: switch to a dual-step HYP init code Marc Zyngier
2013-04-12 18:12 ` [PATCH v4 7/7] ARM: KVM: perform HYP initilization for hotplugged CPUs Marc Zyngier
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=20130426110558.GE5007@localhost.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.