]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Fix duplication of host SLB entries
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 21 Mar 2018 22:48:54 +0000 (09:48 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 23 Mar 2018 02:42:51 +0000 (13:42 +1100)
commitb43544150c70cf21a2acb2988d8d6149eb44cb1d
tree14034ebfb2e11d6482f1c79c4c40e9d2bac6aebc
parent3aca31855b712d30b6cae87b21e5cceca2c6dbb7
KVM: PPC: Book3S HV: Fix duplication of host SLB entries

Since commit 43ae2825124c ("KVM: PPC: Book3S HV: Do SLB load/unload
with guest LPCR value loaded", 2018-01-11), we have been seeing
occasional machine check interrupts on POWER8 systems when running
KVM guests, due to SLB multihit errors.

This turns out to be due to the guest exit code reloading the host
SLB entries from the SLB shadow buffer when the SLB was not previously
cleared in the guest entry path.  This can happen because the path
which skips from the guest entry code to the guest exit code without
entering the guest now does the skip before the SLB is cleared and
loaded with guest values, but the host values are loaded after the
point in the guest exit path that we skip to.

To fix this, we move the code that reloads the host SLB values up
so that it occurs just before the point in the guest exit code (the
label guest_bypass:) where we skip to from the guest entry path.

Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Fixes: 43ae2825124c ("KVM: PPC: Book3S HV: Do SLB load/unload with guest LPCR value loaded")
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S