From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] ARM: KVM: add missing dsb before invalidating Stage-2 TLBs
Date: Wed, 19 Jun 2013 17:05:22 -0700 [thread overview]
Message-ID: <20130620000522.GH7870@lvm> (raw)
In-Reply-To: <1371648006-8036-3-git-send-email-marc.zyngier@arm.com>
On Wed, Jun 19, 2013 at 02:20:03PM +0100, Marc Zyngier wrote:
> When performing a Stage-2 TLB invalidation, it is necessary to
> make sure the write to the page tables is observable by all CPUs.
>
> For this purpose, add a dsb instruction to __kvm_tlb_flush_vmid_ipa
> before doing the TLB invalidation itself.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> arch/arm/kvm/interrupts.S | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
> index d0a8fa3..afa6c04 100644
> --- a/arch/arm/kvm/interrupts.S
> +++ b/arch/arm/kvm/interrupts.S
> @@ -49,6 +49,7 @@ __kvm_hyp_code_start:
> ENTRY(__kvm_tlb_flush_vmid_ipa)
> push {r2, r3}
>
> + dsb
shouldn't this be a dmb then?
thinking that a dsb only ensures completion between load/stores and not
between the preceeding store and the actual invalidate operation?
or are we relying on the fact that the store must complete before the
ldrd below, which must happen before the mcrr, which must happen before
the invalidate (?), and therefore it's all good?
> add r0, r0, #KVM_VTTBR
> ldrd r2, r3, [r0]
> mcrr p15, 6, r2, r3, c2 @ Write VTTBR
> --
> 1.8.2.3
>
>
>
> _______________________________________________
> kvmarm mailing list
> kvmarm at lists.cs.columbia.edu
> https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm
next prev parent reply other threads:[~2013-06-20 0:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 13:20 [PATCH 0/5] A handful of KVM/ARM fixes Marc Zyngier
2013-06-19 13:20 ` [PATCH 1/5] ARM: KVM: perform save/restore of PAR Marc Zyngier
2013-06-19 13:20 ` [PATCH 2/5] ARM: KVM: add missing dsb before invalidating Stage-2 TLBs Marc Zyngier
2013-06-20 0:05 ` Christoffer Dall [this message]
2013-06-20 0:08 ` Christoffer Dall
2013-06-20 10:47 ` Will Deacon
2013-06-19 13:20 ` [PATCH 3/5] ARM: KVM: make sure maintainance operation complete before world switch Marc Zyngier
2013-06-20 0:18 ` Christoffer Dall
2013-06-20 8:13 ` Marc Zyngier
2013-06-20 17:14 ` Christoffer Dall
2013-06-20 17:29 ` Marc Zyngier
2013-06-20 18:15 ` Will Deacon
2013-06-20 18:28 ` Christoffer Dall
2013-06-20 18:38 ` Will Deacon
2013-06-20 18:50 ` Christoffer Dall
2013-06-20 10:48 ` Will Deacon
2013-06-19 13:20 ` [PATCH 4/5] ARM: KVM: clear exclusive monitor on all exception returns Marc Zyngier
2013-06-20 0:27 ` Christoffer Dall
2013-06-20 8:29 ` Marc Zyngier
2013-06-19 13:20 ` [PATCH 5/5] ARM: KVM: issue a DSB after cache maintainance operations Marc Zyngier
2013-06-20 10:46 ` Will Deacon
2013-06-20 18:33 ` [PATCH 0/5] A handful of KVM/ARM fixes Christoffer Dall
2013-06-20 18:41 ` Marc Zyngier
2013-06-20 18:48 ` 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=20130620000522.GH7870@lvm \
--to=christoffer.dall@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).