Commit 1ebc41a9 authored by Will Deacon's avatar Will Deacon Committed by Jiri Slaby

arm64: kvm: use inner-shareable barriers for inner-shareable maintenance

commit ee9e101c upstream.

In order to ensure completion of inner-shareable maintenance instructions
(cache and TLB) on AArch64, we can use the -ish suffix to the dsb
instruction.

This patch relaxes our dsb sy instructions to dsb ish where possible.
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 68779c62
...@@ -617,9 +617,15 @@ ENTRY(__kvm_tlb_flush_vmid_ipa) ...@@ -617,9 +617,15 @@ ENTRY(__kvm_tlb_flush_vmid_ipa)
* whole of Stage-1. Weep... * whole of Stage-1. Weep...
*/ */
tlbi ipas2e1is, x1 tlbi ipas2e1is, x1
dsb sy /*
* We have to ensure completion of the invalidation at Stage-2,
* since a table walk on another CPU could refill a TLB with a
* complete (S1 + S2) walk based on the old Stage-2 mapping if
* the Stage-1 invalidation happened first.
*/
dsb ish
tlbi vmalle1is tlbi vmalle1is
dsb sy dsb ish
isb isb
msr vttbr_el2, xzr msr vttbr_el2, xzr
...@@ -630,7 +636,7 @@ ENTRY(__kvm_flush_vm_context) ...@@ -630,7 +636,7 @@ ENTRY(__kvm_flush_vm_context)
dsb ishst dsb ishst
tlbi alle1is tlbi alle1is
ic ialluis ic ialluis
dsb sy dsb ish
ret ret
ENDPROC(__kvm_flush_vm_context) ENDPROC(__kvm_flush_vm_context)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment