From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic broadcast quirk Date: Wed, 13 Jul 2016 12:15:03 +0200 Message-ID: <10fcb396-853f-e08b-48d9-c2e69189798d@redhat.com> References: <20160712200930.32143-1-rkrcmar@redhat.com> <20160712200930.32143-13-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu , Yang Zhang To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <20160712200930.32143-13-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 12/07/2016 22:09, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > +static bool kvm_apic_map_need_slowpath(struct kvm *kvm, struct kvm_l= apic **src, > + struct kvm_lapic_irq *irq, struct kvm_apic_map *map) > +{ > + if (!map) > + return true; > + > + if (kvm->arch.x2apic_broadcast_quirk_disabled) { > + if ((irq->dest_id =3D=3D APIC_BROADCAST && > + map->mode !=3D KVM_APIC_MODE_X2APIC)) > + return true; > + if (irq->dest_id =3D=3D X2APIC_BROADCAST) > + return true; > + } else { > + bool x2apic_ipi =3D src && *src && apic_x2apic_mode(*src); > + if (irq->dest_id =3D=3D (x2apic_ipi ? > + X2APIC_BROADCAST : APIC_BROADCAST)) > + return true; > + } > + > + return false; > +} This isn't the only case where you go through the slowpath. What about renaming to kvm_apic_dest_is_broadcast? Paolo