summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/kvm_mmu.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-02-01 11:07:38 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2018-05-31 11:09:03 +0100
commit0c47ac8cd157727e7a532d665d6fb1b5fd333977 (patch)
tree3c2e82a8bfa1eac1f305e05221b61605b76718e8 /arch/arm/include/asm/kvm_mmu.h
parent3f7e8e2e1ebda787f156ce46e3f0a9ce2833fa4f (diff)
ARM: KVM: invalidate icache on guest exit for Cortex-A15
In order to avoid aliasing attacks against the branch predictor on Cortex-A15, let's invalidate the BTB on guest exit, which can only be done by invalidating the icache (with ACTLR[0] being set). We use the same hack as for A12/A17 to perform the vector decoding. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Boot-tested-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/include/asm/kvm_mmu.h')
-rw-r--r--arch/arm/include/asm/kvm_mmu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h
index d08ce9c41df4..48edb1f4ced4 100644
--- a/arch/arm/include/asm/kvm_mmu.h
+++ b/arch/arm/include/asm/kvm_mmu.h
@@ -306,6 +306,11 @@ static inline void *kvm_get_hyp_vector(void)
return kvm_ksym_ref(__kvm_hyp_vector_bp_inv);
}
+ case ARM_CPU_PART_CORTEX_A15:
+ {
+ extern char __kvm_hyp_vector_ic_inv[];
+ return kvm_ksym_ref(__kvm_hyp_vector_ic_inv);
+ }
#endif
default:
{