]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: Rework user space NMI injection as KVM_CAP_USER_NMI kvm-81 kvm-81rc1
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 11 Dec 2008 15:54:54 +0000 (16:54 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 14 Dec 2008 08:10:00 +0000 (10:10 +0200)
commit32234396669127c4b5bb2a55882e11f8cd6a57a7
tree5360a066812fd5679b3f6e9dc2fe775261eb26bc
parent387f7ca1b989fbde0e43d1e6aa4cbcf52dc5b730
KVM: x86: Rework user space NMI injection as KVM_CAP_USER_NMI

There is no point in doing the ready_for_nmi_injection/
request_nmi_window dance with user space. First, we don't do this for
in-kernel irqchip anyway, while the code path is the same as for user
space irqchip mode. And second, there is nothing to loose if a pending
NMI is overwritten by another one (in contrast to IRQs where we have to
save the number). Actually, there is even the risk of raising spurious
NMIs this way because the reason for the held-back NMI might already be
handled while processing the first one.

Therefore this patch creates a simplified user space NMI injection
interface, exporting it under KVM_CAP_USER_NMI and dropping the old
KVM_CAP_NMI capability. And this time we also take care to provide the
interface only on archs supporting NMIs via KVM (right now only x86).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
include/linux/kvm.h