lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10fcb396-853f-e08b-48d9-c2e69189798d@redhat.com>
Date:	Wed, 13 Jul 2016 12:15:03 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Radim Krčmář <rkrcmar@...hat.com>,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc:	"Lan, Tianyu" <tianyu.lan@...el.com>,
	Igor Mammedov <imammedo@...hat.com>,
	Jan Kiszka <jan.kiszka@....de>, Peter Xu <peterx@...hat.com>,
	Yang Zhang <yang.zhang.wz@...il.com>
Subject: Re: [PATCH v3 12/14] KVM: x86: add a flag to disable KVM x2apic
 broadcast quirk



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?

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ