Commit e5dc4877 authored by Radim Krčmář's avatar Radim Krčmář

KVM: x86: refactor pic setup in kvm_set_routing_entry

Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 09941366
...@@ -297,14 +297,12 @@ int kvm_set_routing_entry(struct kvm *kvm, ...@@ -297,14 +297,12 @@ int kvm_set_routing_entry(struct kvm *kvm,
case KVM_IRQ_ROUTING_IRQCHIP: case KVM_IRQ_ROUTING_IRQCHIP:
delta = 0; delta = 0;
switch (ue->u.irqchip.irqchip) { switch (ue->u.irqchip.irqchip) {
case KVM_IRQCHIP_PIC_MASTER:
e->set = kvm_set_pic_irq;
max_pin = PIC_NUM_PINS;
break;
case KVM_IRQCHIP_PIC_SLAVE: case KVM_IRQCHIP_PIC_SLAVE:
delta = 8;
/* fall through */
case KVM_IRQCHIP_PIC_MASTER:
e->set = kvm_set_pic_irq; e->set = kvm_set_pic_irq;
max_pin = PIC_NUM_PINS; max_pin = PIC_NUM_PINS;
delta = 8;
break; break;
case KVM_IRQCHIP_IOAPIC: case KVM_IRQCHIP_IOAPIC:
max_pin = KVM_IOAPIC_NUM_PINS; max_pin = KVM_IOAPIC_NUM_PINS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment