]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Check for updated HDSISR on P9 HDSI exception
authorMichael Neuling <mikey@neuling.org>
Fri, 15 Sep 2017 05:26:14 +0000 (15:26 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Sep 2017 08:45:46 +0000 (10:45 +0200)
commitb0e1ae4ff2a984cd9aad929fa88e7e7bce899ffb
tree2e9f3888f00ccfeb4ad997bdafbadd7ad1810dfe
parent0c64f335eed5693d651351092ac4caad0778c4d4
KVM: PPC: Book3S HV: Check for updated HDSISR on P9 HDSI exception

On POWER9 DD2.1 and below, sometimes on a Hypervisor Data Storage
Interrupt (HDSI) the HDSISR is not be updated at all.

To work around this we put a canary value into the HDSISR before
returning to a guest and then check for this canary when we take a
HDSI. If we find the canary on a HDSI, we know the hardware didn't
update the HDSISR. In this case we return to the guest to retake the
HDSI which should correctly update the HDSISR the second time HDSI
entry.

After talking to Paulus we've applied this workaround to all POWER9
CPUs. The workaround of returning to the guest shouldn't ever be
triggered on well behaving CPU. The extra instructions should have
negligible performance impact.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/kvm/book3s_hv_rmhandlers.S