]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Add new capability to control MCE behaviour
authorAravinda Prasad <aravinda@linux.vnet.ibm.com>
Thu, 11 May 2017 11:02:48 +0000 (16:32 +0530)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 21 Jun 2017 03:37:08 +0000 (13:37 +1000)
commit1835b1bf1ee7c073691fd4772cb70860eb87558c
tree3cf9dad6e4bf242274a3a5913ec2110d62436074
parentf6e39b98f852f659013eee493f5e96555e306605
KVM: PPC: Book3S HV: Add new capability to control MCE behaviour

This introduces a new KVM capability to control how KVM behaves
on machine check exception (MCE) in HV KVM guests.

If this capability has not been enabled, KVM redirects machine check
exceptions to guest's 0x200 vector, if the address in error belongs to
the guest. With this capability enabled, KVM will cause a guest exit
with the exit reason indicating an NMI.

The new capability is required to avoid problems if a new kernel/KVM
is used with an old QEMU, running a guest that doesn't issue
"ibm,nmi-register".  As old QEMU does not understand the NMI exit
type, it treats it as a fatal error.  However, the guest could have
handled the machine check error if the exception was delivered to
guest's 0x200 interrupt vector instead of NMI exit in case of old
QEMU.

[paulus@ozlabs.org - Reworded the commit message to be clearer,
 enable only on HV KVM.]

Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Documentation/virtual/kvm/api.txt
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kvm/powerpc.c
include/uapi/linux/kvm.h