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


Groups > linux.kernel > #1442522

Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic broadcast quirk

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic broadcast quirk
Date 2016-07-13 17:00 +0200
Message-ID <rUtNM-4qs-19@gated-at.bofh.it> (permalink)
References <rUcjT-1np-3@gated-at.bofh.it> <rUcjT-1np-1@gated-at.bofh.it> <rUpqO-1JD-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-07-13 12:15+0200, Paolo Bonzini:
> On 12/07/2016 22:09, Radim Krčmář wrote:
>> +static bool kvm_apic_map_need_slowpath(struct kvm *kvm, struct kvm_lapic **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 == APIC_BROADCAST &&
>> +				map->mode != KVM_APIC_MODE_X2APIC))
>> +			return true;
>> +		if (irq->dest_id == X2APIC_BROADCAST)
>> +			return true;
>> +	} else {
>> +		bool x2apic_ipi = src && *src && apic_x2apic_mode(*src);
>> +		if (irq->dest_id == (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?

Yeah, sorry.  I have a patch that adds a check for 0xff in flat lapic
mode (can be handled in the fast path) and used the same name even
before the check ...

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


Thread

[PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic broadcast quirk Radim Krčmář <rkrcmar@redhat.com> - 2016-07-12 22:20 +0200
  Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic  broadcast quirk Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 10:40 +0200
    Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic  broadcast quirk Radim Krčmář <rkrcmar@redhat.com> - 2016-07-13 17:20 +0200
      Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic  broadcast quirk Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 17:40 +0200
  Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic  broadcast quirk Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 12:20 +0200
    Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic  broadcast quirk Radim Krčmář <rkrcmar@redhat.com> - 2016-07-13 17:00 +0200

csiph-web