]> 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)
commit37813f03a19f795a16550fe95156ed02a53ed089
tree615f801305caa785a9230cda64d75df408f09930
parent652cc445c2b41e473e4a3babfc463b8d264d9f66
KVM: PPC: Book3S HV: Ensure radix guest has no SLB entries

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