[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0aa4231-b7fa-5b44-a251-4dc81676688c@redhat.com>
Date: Fri, 28 Oct 2016 14:07:21 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Luc, Piotr" <Piotr.Luc@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"he.chen@...ux.intel.com" <he.chen@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"Kang, Luwei" <luwei.kang@...el.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>
Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS
features to kvm guest
On 28/10/2016 13:08, Borislav Petkov wrote:
> On Fri, Oct 28, 2016 at 12:17:02PM +0200, Paolo Bonzini wrote:
>> Otherwise, if you add a cpuid_count_edx function to processor.h then one
>> can do:
>>
>> entry_>edx &= cpuid_count_edx(7, 0);
>>
>> which is decent too.
>
> If you think of iterating over the cpuid_bits[] array and recreating the
> CPUID leaf for KVM, sure, why not...
>
cpuid_count_edx would be just
static inline unsigned int cpuid_count_edx(unsigned op, unsigned count)
{
unsigned int eax, ebx, ecx, edx;
cpuid_count(op, count, &eax, &ebx, &ecx, &edx);
return edx;
}
Paolo
Powered by blists - more mailing lists