]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: refactor/fix IRQ and NMI injectability determination
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 26 Sep 2008 07:30:49 +0000 (09:30 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:51:40 +0000 (16:51 +0200)
commit235770dc38ac93e94c69c2f22870afdd540c4a50
tree41b23c564a9459bbc81e426503e0dc103cf7f45a
parentd4db6b93df2611858474f7bc20affca262ee4c7c
KVM: VMX: refactor/fix IRQ and NMI injectability determination

There are currently two ways in VMX to check if an IRQ or NMI can be
injected:
 - vmx_{nmi|irq}_enabled and
 - vcpu.arch.{nmi|interrupt}_window_open.
Even worse, one test (at the end of vmx_vcpu_run) uses an inconsistent,
likely incorrect logic.

This patch consolidates and unifies the tests over
{nmi|interrupt}_window_open as cache + vmx_update_window_states
for updating the cache content.

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