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

KVM: PPC: Book3S HV: Use POWER9 SLBIA IH=6 variant to clear SLB



IH=6 may preserve hypervisor real-mode ERAT entries and is the
recommended SLBIA hint for switching partitions.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
parent 078ebe35
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -912,7 +912,7 @@ BEGIN_MMU_FTR_SECTION
	/* Radix host won't have populated the SLB, so no need to clear */
	/* Radix host won't have populated the SLB, so no need to clear */
	li	r6, 0
	li	r6, 0
	slbmte	r6, r6
	slbmte	r6, r6
	slbia
	PPC_SLBIA(6)
	ptesync
	ptesync
END_MMU_FTR_SECTION_IFCLR(MMU_FTR_TYPE_RADIX)
END_MMU_FTR_SECTION_IFCLR(MMU_FTR_TYPE_RADIX)


@@ -1520,7 +1520,7 @@ guest_exit_cont: /* r9 = vcpu, r12 = trap, r13 = paca */
	/* Finally clear out the SLB */
	/* Finally clear out the SLB */
	li	r0,0
	li	r0,0
	slbmte	r0,r0
	slbmte	r0,r0
	slbia
	PPC_SLBIA(6)
	ptesync
	ptesync
	stw	r5,VCPU_SLB_MAX(r9)
	stw	r5,VCPU_SLB_MAX(r9)


@@ -3352,7 +3352,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_DAWR1)


	/* Clear hash and radix guest SLB, see guest_exit_short_path comment. */
	/* Clear hash and radix guest SLB, see guest_exit_short_path comment. */
	slbmte	r0, r0
	slbmte	r0, r0
	slbia
	PPC_SLBIA(6)


BEGIN_MMU_FTR_SECTION
BEGIN_MMU_FTR_SECTION
	b	4f
	b	4f