diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/ioapic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 317f8e211cd2..4232fd75dd20 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -211,6 +211,10 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
211 | case IOAPIC_LOWEST_PRIORITY: | 211 | case IOAPIC_LOWEST_PRIORITY: |
212 | vcpu = kvm_get_lowest_prio_vcpu(ioapic->kvm, vector, | 212 | vcpu = kvm_get_lowest_prio_vcpu(ioapic->kvm, vector, |
213 | deliver_bitmask); | 213 | deliver_bitmask); |
214 | #ifdef CONFIG_X86 | ||
215 | if (irq == 0) | ||
216 | vcpu = ioapic->kvm->vcpus[0]; | ||
217 | #endif | ||
214 | if (vcpu != NULL) | 218 | if (vcpu != NULL) |
215 | ioapic_inj_irq(ioapic, vcpu, vector, | 219 | ioapic_inj_irq(ioapic, vcpu, vector, |
216 | trig_mode, delivery_mode); | 220 | trig_mode, delivery_mode); |
@@ -220,6 +224,10 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
220 | deliver_bitmask, vector, IOAPIC_LOWEST_PRIORITY); | 224 | deliver_bitmask, vector, IOAPIC_LOWEST_PRIORITY); |
221 | break; | 225 | break; |
222 | case IOAPIC_FIXED: | 226 | case IOAPIC_FIXED: |
227 | #ifdef CONFIG_X86 | ||
228 | if (irq == 0) | ||
229 | deliver_bitmask = 1; | ||
230 | #endif | ||
223 | for (vcpu_id = 0; deliver_bitmask != 0; vcpu_id++) { | 231 | for (vcpu_id = 0; deliver_bitmask != 0; vcpu_id++) { |
224 | if (!(deliver_bitmask & (1 << vcpu_id))) | 232 | if (!(deliver_bitmask & (1 << vcpu_id))) |
225 | continue; | 233 | continue; |