diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2016-12-16 18:10:04 +0300 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-01-09 16:45:36 +0300 |
commit | e5dc48777dcc898210e2f16d80d44718db38cdc3 (patch) | |
tree | c7a3e812d115c1c88c70331f3d4f54f01f4a480c /arch/x86/kvm/irq_comm.c | |
parent | 099413664c71fcf9d0099eba4f8a4dd59653d5a3 (diff) | |
download | linux-e5dc48777dcc898210e2f16d80d44718db38cdc3.tar.xz |
KVM: x86: refactor pic setup in kvm_set_routing_entry
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/irq_comm.c')
-rw-r--r-- | arch/x86/kvm/irq_comm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index 6c0191615f23..1dfeb185a1e3 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c @@ -297,14 +297,12 @@ int kvm_set_routing_entry(struct kvm *kvm, case KVM_IRQ_ROUTING_IRQCHIP: delta = 0; 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: + delta = 8; + /* fall through */ + case KVM_IRQCHIP_PIC_MASTER: e->set = kvm_set_pic_irq; max_pin = PIC_NUM_PINS; - delta = 8; break; case KVM_IRQCHIP_IOAPIC: max_pin = KVM_IOAPIC_NUM_PINS; |