diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-10-10 06:18:28 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-10-13 20:32:53 -0400 |
commit | 2cde3716321ec64a1faeaf567bd94100c7b4160f (patch) | |
tree | 2894440e99d3d8b0d92e9cafb5df18e8840cb721 | |
parent | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 (diff) |
KVM: PPC: Book3S HV: POWER9 more doorbell fixes
- Add another case where msgsync is required.
- Required barrier sequence for global doorbells is msgsync ; lwsync
When msgsnd is used for IPIs to other cores, msgsync must be executed by
the target to order stores performed on the source before its msgsnd
(provided the source executes the appropriate sync).
Fixes: 1704a81ccebc ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9")
Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rmhandlers.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index ec69fa45d5a2..c700bedccaab 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -1310,6 +1310,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) | |||
1310 | bne 3f | 1310 | bne 3f |
1311 | BEGIN_FTR_SECTION | 1311 | BEGIN_FTR_SECTION |
1312 | PPC_MSGSYNC | 1312 | PPC_MSGSYNC |
1313 | lwsync | ||
1313 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) | 1314 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) |
1314 | lbz r0, HSTATE_HOST_IPI(r13) | 1315 | lbz r0, HSTATE_HOST_IPI(r13) |
1315 | cmpwi r0, 0 | 1316 | cmpwi r0, 0 |
@@ -2788,6 +2789,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) | |||
2788 | PPC_MSGCLR(6) | 2789 | PPC_MSGCLR(6) |
2789 | /* see if it's a host IPI */ | 2790 | /* see if it's a host IPI */ |
2790 | li r3, 1 | 2791 | li r3, 1 |
2792 | BEGIN_FTR_SECTION | ||
2793 | PPC_MSGSYNC | ||
2794 | lwsync | ||
2795 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) | ||
2791 | lbz r0, HSTATE_HOST_IPI(r13) | 2796 | lbz r0, HSTATE_HOST_IPI(r13) |
2792 | cmpwi r0, 0 | 2797 | cmpwi r0, 0 |
2793 | bnelr | 2798 | bnelr |