[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <425702906.9319122.1477743677017.JavaMail.zimbra@redhat.com>
Date: Sat, 29 Oct 2016 08:21:17 -0400 (EDT)
From: Paolo Bonzini <pbonzini@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Piotr Luc <Piotr.Luc@...el.com>, kvm@...r.kernel.org,
he chen <he.chen@...ux.intel.com>,
linux-kernel@...r.kernel.org, tglx@...utronix.de, x86@...nel.org,
hpa@...or.com, mingo@...hat.com, Luwei Kang <luwei.kang@...el.com>,
rkrcmar@...hat.com
Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS
features to kvm guest
----- Original Message -----
> From: "Borislav Petkov" <bp@...en8.de>
> To: "Paolo Bonzini" <pbonzini@...hat.com>
> Cc: "Piotr Luc" <Piotr.Luc@...el.com>, kvm@...r.kernel.org, "he chen" <he.chen@...ux.intel.com>,
> linux-kernel@...r.kernel.org, tglx@...utronix.de, x86@...nel.org, hpa@...or.com, mingo@...hat.com, "Luwei Kang"
> <luwei.kang@...el.com>, rkrcmar@...hat.com
> Sent: Friday, October 28, 2016 2:21:23 PM
> Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest
>
> On Fri, Oct 28, 2016 at 02:07:21PM +0200, Paolo Bonzini wrote:
> > 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;
> > }
>
> Even better.
>
> But shouldn't this be hiding unimplemented CPUID bits from the guest?
Currently none of the bits in CPUID[7,0].edx is ever masked by the host, so
this would be enough. If we ever need to do some masking, I guess I'll
practice my puss-in-boots look and submit a patch to add CPUID[7,0] back
as a separate cpufeature entr.
Paolo
Powered by blists - more mailing lists