Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd0fdb19 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Paul Mackerras
Browse files

KVM: PPC: Book3S HV: Use msgsync with hypervisor doorbells on POWER9



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: 1704a81c ("KVM: PPC: Book3S HV: Use msgsnd for IPIs to other cores on POWER9")
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
parent f2d8421b
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1291,6 +1291,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
	/* Hypervisor doorbell - exit only if host IPI flag set */
	/* Hypervisor doorbell - exit only if host IPI flag set */
	cmpwi	r12, BOOK3S_INTERRUPT_H_DOORBELL
	cmpwi	r12, BOOK3S_INTERRUPT_H_DOORBELL
	bne	3f
	bne	3f
BEGIN_FTR_SECTION
	PPC_MSGSYNC
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
	lbz	r0, HSTATE_HOST_IPI(r13)
	lbz	r0, HSTATE_HOST_IPI(r13)
	cmpwi	r0, 0
	cmpwi	r0, 0
	beq	4f
	beq	4f