Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1529558

[PATCH 4/6] KVM: x86: refactor pic setup in kvm_set_routing_entry

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 4/6] KVM: x86: refactor pic setup in kvm_set_routing_entry
Date 2016-11-24 17:40 +0100
Message-ID <sH5e2-5eA-37@gated-at.bofh.it> (permalink)
References <sH5e1-5eA-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 arch/x86/kvm/irq_comm.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
index ddd63b8b176e..913e054a68e9 100644
--- a/arch/x86/kvm/irq_comm.c
+++ b/arch/x86/kvm/irq_comm.c
@@ -289,15 +289,13 @@ int kvm_set_routing_entry(struct kvm *kvm,
 	case KVM_IRQ_ROUTING_IRQCHIP:
 		delta = 0;
 		switch (ue->u.irqchip.irqchip) {
+		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;
 			break;
-		case KVM_IRQCHIP_PIC_SLAVE:
-			e->set = kvm_set_pic_irq;
-			max_pin = PIC_NUM_PINS;
-			delta = 8;
-			break;
 		case KVM_IRQCHIP_IOAPIC:
 			max_pin = KVM_IOAPIC_NUM_PINS;
 			e->set = kvm_set_ioapic_irq;
-- 
2.10.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] KVM: x86: minor irqchip improvements (API change) Radim Krčmář <rkrcmar@redhat.com> - 2016-11-24 17:40 +0100
  [PATCH 4/6] KVM: x86: refactor pic setup in kvm_set_routing_entry Radim Krčmář <rkrcmar@redhat.com> - 2016-11-24 17:40 +0100
  [PATCH 1/6] KVM: x86: do allow kvm irqchip with split irqchip Radim Krčmář <rkrcmar@redhat.com> - 2016-11-24 17:40 +0100
  [PATCH 5/6] KVM: x86: prevent setup of invalid routes Radim Krčmář <rkrcmar@redhat.com> - 2016-11-24 17:40 +0100
  Re: [PATCH 0/6] KVM: x86: minor irqchip improvements (API change) Paolo Bonzini <pbonzini@redhat.com> - 2016-11-24 18:00 +0100

csiph-web