]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S PR: Don't let PAPR guest set MSR hypervisor bit
authorPaul Mackerras <paulus@ozlabs.org>
Thu, 7 Jun 2018 08:07:06 +0000 (18:07 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 12 Jun 2018 23:45:28 +0000 (09:45 +1000)
commitf70850051c6f8c0d59616ab401507cd6a01b60e0
tree517501be92513ab61b3d4e873f2b2c0d76bba971
parent697e74456d1a041129b6c5b3f3b3e8ce49874933
KVM: PPC: Book3S PR: Don't let PAPR guest set MSR hypervisor bit

PAPR guests run in supervisor mode and should not be able to set the
MSR HV (hypervisor mode) bit or clear the ME (machine check enable)
bit by mtmsrd or any other means.  To enforce this, we force MSR_HV
off and MSR_ME on in kvmppc_set_msr_pr.  Without this, the guest
can appear to be in hypervisor mode to itself and to userspace.
This has been observed to cause a crash in QEMU when it tries to
deliver a system reset interrupt to the guest.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_pr.c