From: Marc Zyngier Date: Sun, 11 Jan 2015 13:10:10 +0000 (+0100) Subject: arm64: KVM: Fix TLB invalidation by IPA/VMID X-Git-Tag: v3.16.35~2085 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=793cde3dc6963632dac295f6476eb3a6686d1bdd;p=thirdparty%2Fkernel%2Fstable.git arm64: KVM: Fix TLB invalidation by IPA/VMID commit 55e858b75808347378e5117c3c2339f46cc03575 upstream. It took about two years for someone to notice that the IPA passed to TLBI IPAS2E1IS must be shifted by 12 bits. Clearly our reviewing is not as good as it should be... Paper bag time for me. Reported-by: Mario Smarduch Tested-by: Mario Smarduch Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Paolo Bonzini Signed-off-by: Shannon Zhao Signed-off-by: Luis Henriques --- diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 5dfc8331c3859..3aaf3bc4ad8af 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -629,6 +629,7 @@ ENTRY(__kvm_tlb_flush_vmid_ipa) * Instead, we invalidate Stage-2 for this IPA, and the * whole of Stage-1. Weep... */ + lsr x1, x1, #12 tlbi ipas2e1is, x1 /* * We have to ensure completion of the invalidation at Stage-2,