KVM: PPC: Book3S HV: Ensure radix guest has no SLB entries
authorPaul Mackerras <paulus@ozlabs.org>
Thu, 11 Feb 2021 06:09:45 +0000 (17:09 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 11 Feb 2021 06:19:42 +0000 (17:19 +1100)
commitab950e1acd2175eae825cfcbac621c0625ad2a86
tree615f801305caa785a9230cda64d75df408f09930
parenta722076e947023a0d6ffca79661324c45ff30641
KVM: PPC: Book3S HV: Ensure radix guest has no SLB entries

Commit 68ad28a4cdd4 ("KVM: PPC: Book3S HV: Fix radix guest SLB side
channel") changed the older guest entry path, with the side effect
that vcpu->arch.slb_max no longer gets cleared for a radix guest.
This means that a HPT guest which loads some SLB entries, switches to
radix mode, runs the guest using the old guest entry path (e.g.,
because the indep_threads_mode module parameter has been set to
false), and then switches back to HPT mode would now see the old SLB
entries being present, whereas previously it would have seen no SLB
entries.

To avoid changing guest-visible behaviour, this adds a store
instruction to clear vcpu->arch.slb_max for a radix guest using the
old guest entry path.

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