diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2008-09-26 03:30:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:40 -0500 |
commit | 33f089ca5a61f7aead26e8e1866dfc961dd88a9e (patch) | |
tree | 41b23c564a9459bbc81e426503e0dc103cf7f45a /arch/x86/include/asm/kvm_host.h | |
parent | 448fa4a9c5dbc6941dd19ed09692c588d815bb06 (diff) |
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>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 8346be87cfa1..bfbbdea869bf 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -327,6 +327,7 @@ struct kvm_vcpu_arch { | |||
327 | 327 | ||
328 | bool nmi_pending; | 328 | bool nmi_pending; |
329 | bool nmi_injected; | 329 | bool nmi_injected; |
330 | bool nmi_window_open; | ||
330 | 331 | ||
331 | u64 mtrr[0x100]; | 332 | u64 mtrr[0x100]; |
332 | }; | 333 | }; |