]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit
authorPaul Mackerras <paulus@samba.org>
Sat, 5 Mar 2016 08:34:39 +0000 (19:34 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 8 Mar 2016 02:36:42 +0000 (13:36 +1100)
commitfc8f87d14aed5ab7c7420d9cec8be42989a8b2fb
tree00879794b39f4561398926e0cbc6ba9588827bc3
parent568d8695abcbb8bd10a4cd1e5b9ef7d766fc984e
KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit

Thomas Huth discovered that a guest could cause a hard hang of a
host CPU by setting the Instruction Authority Mask Register (IAMR)
to a suitable value.  It turns out that this is because when the
code was added to context-switch the new special-purpose registers
(SPRs) that were added in POWER8, we forgot to add code to ensure
that they were restored to a sane value on guest exit.

This adds code to set those registers where a bad value could
compromise the execution of the host kernel to a suitable neutral
value on guest exit.

Cc: stable@vger.kernel.org # v3.14+
Fixes: ee15c8236741
Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S