aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-03-30 09:03:18 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:37 -0400
commit8843419048e500f8f38df555bca1bf7948804b7f (patch)
tree3f02aab4718f8aca3e72692854cba05e755862ba
parent37b96e988053c4dd21811b0408a12f8f60b4d0c8 (diff)
KVM: VMX: Do not zero idt_vectoring_info in vmx_complete_interrupts().
We will need it later in task_switch(). Code in handle_exception() is dead. is_external_interrupt(vect_info) will always be false since idt_vectoring_info is zeroed in vmx_complete_interrupts(). Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 577aa9551a97..e4ad9d3c0636 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2626,11 +2626,6 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
2626 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " 2626 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x "
2627 "intr info 0x%x\n", __func__, vect_info, intr_info); 2627 "intr info 0x%x\n", __func__, vect_info, intr_info);
2628 2628
2629 if (!irqchip_in_kernel(vcpu->kvm) && is_external_interrupt(vect_info)) {
2630 int irq = vect_info & VECTORING_INFO_VECTOR_MASK;
2631 kvm_push_irq(vcpu, irq);
2632 }
2633
2634 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR) 2629 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR)
2635 return 1; /* already handled by vmx_vcpu_run() */ 2630 return 1; /* already handled by vmx_vcpu_run() */
2636 2631
@@ -3329,11 +3324,9 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
3329 kvm_queue_exception_e(&vmx->vcpu, vector, err); 3324 kvm_queue_exception_e(&vmx->vcpu, vector, err);
3330 } else 3325 } else
3331 kvm_queue_exception(&vmx->vcpu, vector); 3326 kvm_queue_exception(&vmx->vcpu, vector);
3332 vmx->idt_vectoring_info = 0;
3333 break; 3327 break;
3334 case INTR_TYPE_EXT_INTR: 3328 case INTR_TYPE_EXT_INTR:
3335 kvm_queue_interrupt(&vmx->vcpu, vector); 3329 kvm_queue_interrupt(&vmx->vcpu, vector);
3336 vmx->idt_vectoring_info = 0;
3337 break; 3330 break;
3338 default: 3331 default:
3339 break; 3332 break;