]> 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)
commit37a44e049b5064657ae1ea4932d2aae7d56a92a8
tree2e9f3888f00ccfeb4ad997bdafbadd7ad1810dfe
parent695923948505c806d7545e51e43d40967a4181cf
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