powerpc: Fix definition of SIAR and SDAR registers
authorThomas Huth <thuth@redhat.com>
Thu, 12 May 2016 11:26:44 +0000 (13:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 21 Aug 2016 21:22:44 +0000 (23:22 +0200)
commitaeadb93a16d400f837d0c19e68cf22a884b182a6
treea95a3691451eb1b2d276b2993605cff046977ae8
parentbe925e7ad222afd656ce8a2f9249939fa94b8699
powerpc: Fix definition of SIAR and SDAR registers

commit d23fac2b27d94aeb7b65536a50d32bfdc21fe01e upstream.

The SIAR and SDAR registers are available twice, one time as SPRs
780 / 781 (unprivileged, but read-only), and one time as the SPRs
796 / 797 (privileged, but read and write). The Linux kernel code
currently uses the unprivileged  SPRs - while this is OK for reading,
writing to that register of course does not work.
Since the KVM code tries to write to this register, too (see the mtspr
in book3s_hv_rmhandlers.S), the contents of this register sometimes get
lost for the guests, e.g. during migration of a VM.
To fix this issue, simply switch to the privileged SPR numbers instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/powerpc/include/asm/reg.h