diff options
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/ioapic.c | 7 | ||||
-rw-r--r-- | virt/kvm/irq_comm.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 2458a1dc2ba9..e8ce34c9db32 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -254,10 +254,9 @@ void kvm_ioapic_scan_entry(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap, | |||
254 | spin_lock(&ioapic->lock); | 254 | spin_lock(&ioapic->lock); |
255 | for (index = 0; index < IOAPIC_NUM_PINS; index++) { | 255 | for (index = 0; index < IOAPIC_NUM_PINS; index++) { |
256 | e = &ioapic->redirtbl[index]; | 256 | e = &ioapic->redirtbl[index]; |
257 | if (!e->fields.mask && | 257 | if (e->fields.trig_mode == IOAPIC_LEVEL_TRIG || |
258 | (e->fields.trig_mode == IOAPIC_LEVEL_TRIG || | 258 | kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, index) || |
259 | kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, | 259 | index == RTC_GSI) { |
260 | index) || index == RTC_GSI)) { | ||
261 | if (kvm_apic_match_dest(vcpu, NULL, 0, | 260 | if (kvm_apic_match_dest(vcpu, NULL, 0, |
262 | e->fields.dest_id, e->fields.dest_mode)) { | 261 | e->fields.dest_id, e->fields.dest_mode)) { |
263 | __set_bit(e->fields.vector, | 262 | __set_bit(e->fields.vector, |
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index ced4a542a031..a228ee82bad2 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -323,13 +323,13 @@ out: | |||
323 | 323 | ||
324 | #define IOAPIC_ROUTING_ENTRY(irq) \ | 324 | #define IOAPIC_ROUTING_ENTRY(irq) \ |
325 | { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \ | 325 | { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \ |
326 | .u.irqchip.irqchip = KVM_IRQCHIP_IOAPIC, .u.irqchip.pin = (irq) } | 326 | .u.irqchip = { .irqchip = KVM_IRQCHIP_IOAPIC, .pin = (irq) } } |
327 | #define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq) | 327 | #define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq) |
328 | 328 | ||
329 | #ifdef CONFIG_X86 | 329 | #ifdef CONFIG_X86 |
330 | # define PIC_ROUTING_ENTRY(irq) \ | 330 | # define PIC_ROUTING_ENTRY(irq) \ |
331 | { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \ | 331 | { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \ |
332 | .u.irqchip.irqchip = SELECT_PIC(irq), .u.irqchip.pin = (irq) % 8 } | 332 | .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } } |
333 | # define ROUTING_ENTRY2(irq) \ | 333 | # define ROUTING_ENTRY2(irq) \ |
334 | IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq) | 334 | IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq) |
335 | #else | 335 | #else |