KVM: PPC: Book3S HV: Fix host radix SLB optimisation with hash guests
authorNicholas Piggin <npiggin@gmail.com>
Thu, 11 Feb 2021 05:38:30 +0000 (15:38 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 11 Feb 2021 06:28:15 +0000 (17:28 +1100)
Commit 68ad28a4cdd4 ("KVM: PPC: Book3S HV: Fix radix guest SLB side
channel") incorrectly removed the radix host instruction patch to skip
re-loading the host SLB entries when exiting from a hash
guest. Restore it.

Fixes: 68ad28a4cdd4 ("KVM: PPC: Book3S HV: Fix radix guest SLB side channel")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S

index 0bc1c8248050be9138ed6d396301b449a87fdc0b..5e634db4809bfd2354e977840736eebe62b2119c 100644 (file)
@@ -1525,6 +1525,9 @@ guest_exit_cont:          /* r9 = vcpu, r12 = trap, r13 = paca */
        stw     r5,VCPU_SLB_MAX(r9)
 
        /* load host SLB entries */
+BEGIN_MMU_FTR_SECTION
+       b       guest_bypass
+END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX)
        ld      r8,PACA_SLBSHADOWPTR(r13)
 
        .rept   SLB_NUM_BOLTED