From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935066AbdACNGm (ORCPT ); Tue, 3 Jan 2017 08:06:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50378 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758731AbdACNFP (ORCPT ); Tue, 3 Jan 2017 08:05:15 -0500 Subject: Re: [PATCH v2 4/6] KVM: x86: refactor pic setup in kvm_set_routing_entry To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20161216151006.11776-1-rkrcmar@redhat.com> <20161216151006.11776-5-rkrcmar@redhat.com> Cc: Paolo Bonzini From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <321ef005-9601-7c20-f366-541aa6d48c60@redhat.com> Date: Tue, 3 Jan 2017 14:05:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161216151006.11776-5-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 03 Jan 2017 13:05:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 16.12.2016 um 16:10 schrieb Radim Krčmář: > Reviewed-by: Paolo Bonzini > Signed-off-by: Radim Krčmář > --- > v2: r-b Paolo > --- > 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 6c0191615f23..1dfeb185a1e3 100644 > --- a/arch/x86/kvm/irq_comm.c > +++ b/arch/x86/kvm/irq_comm.c > @@ -297,15 +297,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; > Had the exact same thing in mind when reading that piece of code. Reviewed-by: David Hildenbrand -- David