projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fef436
)
powerpc/fsl: Flush branch predictor when entering KVM
author
Diana Craciun
<diana.craciun@nxp.com>
Wed, 12 Dec 2018 14:03:07 +0000
(16:03 +0200)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Thu, 20 Dec 2018 11:59:03 +0000
(22:59 +1100)
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>
arch/powerpc/kvm/bookehv_interrupts.S
patch
|
blob
|
history
diff --git
a/arch/powerpc/kvm/bookehv_interrupts.S
b/arch/powerpc/kvm/bookehv_interrupts.S
index 051af7d973275ae9294e60f62d45f7932186cdce..4e5081e584098b38f64a8774b7e64b6352e1f674 100644
(file)
--- 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)