]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit18e1a689dbab13ed1baecb50e61af0334f74070d
tree615f801305caa785a9230cda64d75df408f09930
parent8c904be5ad8959c7d6912b1bae4227298864760b
KVM: PPC: Book3S HV: Ensure radix guest has no SLB entries

Commit dcc3f0a51a1e ("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