KVM: PPC: Book3S HV: Use POWER9 SLBIA IH=6 variant to clear SLB
authorNicholas Piggin <npiggin@gmail.com>
Mon, 18 Jan 2021 06:28:09 +0000 (16:28 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 10 Feb 2021 03:31:08 +0000 (14:31 +1100)
IH=6 may preserve hypervisor real-mode ERAT entries and is the
recommended SLBIA hint for switching partitions.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S

index e413d8e34dd87bbc99e6c2a999fcb460f293ebe9..426bdc59fde24de746363a56b76b45dea46b3ec7 100644 (file)
@@ -912,7 +912,7 @@ BEGIN_MMU_FTR_SECTION
        /* Radix host won't have populated the SLB, so no need to clear */
        li      r6, 0
        slbmte  r6, r6
-       slbia
+       PPC_SLBIA(6)
        ptesync
 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 */
        li      r0,0
        slbmte  r0,r0
-       slbia
+       PPC_SLBIA(6)
        ptesync
        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. */
        slbmte  r0, r0
-       slbia
+       PPC_SLBIA(6)
 
 BEGIN_MMU_FTR_SECTION
        b       4f