KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements
authorGleb Natapov <gleb@redhat.com>
Mon, 30 Mar 2009 13:03:13 +0000 (16:03 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:37 +0000 (11:48 +0300)
commit37b96e988053c4dd21811b0408a12f8f60b4d0c8
tree8f738a60f749f535a843eedf9dd343d83c9c724c
parent7b4a25cb296e2a73d2e87a4af65361d45d450a27
KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements

...with a more straightforward switch().

Also fix a bug when NMI could be dropped on exit. Although this should
never happen in practice, since NMIs can only be injected, never triggered
internally by the guest like exceptions.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c