diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2008-09-26 03:30:46 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:40 -0500 |
commit | e4a41889ece6c95f390a7fa3a94255ab62470968 (patch) | |
tree | 9361a3c7501972708cefc03c5e84345f0bc5b69e /arch/x86/kvm/vmx.c | |
parent | a26bf12afb608eb5a96192eaee35fc08ffbf85aa (diff) |
KVM: VMX: Use INTR_TYPE_NMI_INTR instead of magic value
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ac3453799c17..81cf12b8d12a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2492,7 +2492,7 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2492 | set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); | 2492 | set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); |
2493 | } | 2493 | } |
2494 | 2494 | ||
2495 | if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == 0x200) /* nmi */ | 2495 | if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR) |
2496 | return 1; /* already handled by vmx_vcpu_run() */ | 2496 | return 1; /* already handled by vmx_vcpu_run() */ |
2497 | 2497 | ||
2498 | if (is_no_device(intr_info)) { | 2498 | if (is_no_device(intr_info)) { |
@@ -3337,7 +3337,7 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
3337 | intr_info = vmcs_read32(VM_EXIT_INTR_INFO); | 3337 | intr_info = vmcs_read32(VM_EXIT_INTR_INFO); |
3338 | 3338 | ||
3339 | /* We need to handle NMIs before interrupts are enabled */ | 3339 | /* We need to handle NMIs before interrupts are enabled */ |
3340 | if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == 0x200 && | 3340 | if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR && |
3341 | (intr_info & INTR_INFO_VALID_MASK)) { | 3341 | (intr_info & INTR_INFO_VALID_MASK)) { |
3342 | KVMTRACE_0D(NMI, vcpu, handler); | 3342 | KVMTRACE_0D(NMI, vcpu, handler); |
3343 | asm("int $2"); | 3343 | asm("int $2"); |