diff options
author | Diana Craciun <diana.craciun@nxp.com> | 2019-03-29 14:26:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 07:25:14 +0300 |
commit | 51a498016367f57118a905f209410f3f13f59862 (patch) | |
tree | 3ca9db0cdbc4cdc388b45b3420416a34e5666966 /arch/powerpc/kvm | |
parent | d5b60fb984dd9e9974f9adb949cbc2ac2d4ac6e4 (diff) | |
download | linux-51a498016367f57118a905f209410f3f13f59862.tar.xz |
powerpc/fsl: Flush branch predictor when entering KVM
commit e7aa61f47b23afbec41031bc47ca8d6cb6516abc upstream.
Switching from the guest to host is another place
where the speculative accesses can be exploited.
Flush the branch predictor when entering KVM.
Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/bookehv_interrupts.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index 81bd8a07aa51..612b7f6a887f 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/arch/powerpc/kvm/bookehv_interrupts.S @@ -75,6 +75,10 @@ PPC_LL r1, VCPU_HOST_STACK(r4) PPC_LL r2, HOST_R2(r1) +START_BTB_FLUSH_SECTION + BTB_FLUSH(r10) +END_BTB_FLUSH_SECTION + mfspr r10, SPRN_PID lwz r8, VCPU_HOST_PID(r4) PPC_LL r11, VCPU_SHARED(r4) |