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]
Date:   Thu, 20 Jun 2019 14:16:22 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Jing Liu <jing2.liu@...ux.intel.com>, kvm@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, jing2.liu@...el.com
Subject: Re: [PATCH RFC] kvm: x86: Expose AVX512_BF16 feature to guest

On 20/06/19 13:21, Jing Liu wrote:
> +		for (i = 1; i <= times; i++) {
> +			if (*nent >= maxnent)
> +				goto out;
> +			do_cpuid_1_ent(&entry[i], function, i);
> +			entry[i].eax &= F(AVX512_BF16);
> +			entry[i].ebx = 0;
> +			entry[i].ecx = 0;
> +			entry[i].edx = 0;
> +			entry[i].flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
> +			++*nent;

This woud be wrong for i > 1, so instead make this

	if (entry->eax >= 1)

and define F(AVX512_BF16) as a new constant kvm_cpuid_7_1_eax_features.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ