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.]
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -895,6 +895,7 @@ struct kvm_ppc_resize_hpt { · 894 unmodified lines | ||
| 895 | 895 | #define KVM_CAP_SPAPR_TCE_VFIO 142 |
| 896 | 896 | #define KVM_CAP_X86_GUEST_MWAIT 143 |
| 897 | 897 | #define KVM_CAP_ARM_USER_IRQ 144 |
| 898 | +#define KVM_CAP_PPC_FWNMI 145 | |
| 898 | 899 | |
| 899 | 900 | #ifdef KVM_CAP_IRQ_ROUTING |
| 900 | 901 | |