提交 29c8fa32 编写于 作者: A Amit Shah 提交者: Avi Kivity

KVM: Use kvm_set_irq to inject interrupts

... instead of using the pic and ioapic variants
Signed-off-by: NAmit Shah <amit.shah@qumranet.com>
Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 94c935a1
...@@ -596,10 +596,8 @@ void kvm_free_pit(struct kvm *kvm) ...@@ -596,10 +596,8 @@ void kvm_free_pit(struct kvm *kvm)
static void __inject_pit_timer_intr(struct kvm *kvm) static void __inject_pit_timer_intr(struct kvm *kvm)
{ {
mutex_lock(&kvm->lock); mutex_lock(&kvm->lock);
kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 1); kvm_set_irq(kvm, 0, 1);
kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 0); kvm_set_irq(kvm, 0, 0);
kvm_pic_set_irq(pic_irqchip(kvm), 0, 1);
kvm_pic_set_irq(pic_irqchip(kvm), 0, 0);
mutex_unlock(&kvm->lock); mutex_unlock(&kvm->lock);
} }
......
...@@ -1956,13 +1956,7 @@ long kvm_arch_vm_ioctl(struct file *filp, ...@@ -1956,13 +1956,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
goto out; goto out;
if (irqchip_in_kernel(kvm)) { if (irqchip_in_kernel(kvm)) {
mutex_lock(&kvm->lock); mutex_lock(&kvm->lock);
if (irq_event.irq < 16) kvm_set_irq(kvm, irq_event.irq, irq_event.level);
kvm_pic_set_irq(pic_irqchip(kvm),
irq_event.irq,
irq_event.level);
kvm_ioapic_set_irq(kvm->arch.vioapic,
irq_event.irq,
irq_event.level);
mutex_unlock(&kvm->lock); mutex_unlock(&kvm->lock);
r = 0; r = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册