From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest Date: Sat, 29 Oct 2016 08:36:11 -0400 (EDT) Message-ID: <1409336705.9320510.1477744571210.JavaMail.zimbra@redhat.com> References: <1477645960-6898-1-git-send-email-he.chen@linux.intel.com> <1477649272.17668.7.camel@intel.com> <5c00fdf0-a5a4-7a78-4ed8-8ae3ef710a68@redhat.com> <20161028110834.svzzs5hftg3bybiz@pd.tnic> <20161028122123.24i3synevehn6r3p@pd.tnic> <425702906.9319122.1477743677017.JavaMail.zimbra@redhat.com> <20161029122548.niyvh2q3kuvyqwo3@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Piotr Luc , kvm@vger.kernel.org, he chen , linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org, hpa@zytor.com, mingo@redhat.com, Luwei Kang , rkrcmar@redhat.com To: Borislav Petkov Return-path: In-Reply-To: <20161029122548.niyvh2q3kuvyqwo3@pd.tnic> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org ----- Original Message ----- > From: "Borislav Petkov" > To: "Paolo Bonzini" > Cc: "Piotr Luc" , kvm@vger.kernel.org, "he chen" , > linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org, hpa@zytor.com, mingo@redhat.com, "Luwei Kang" > , rkrcmar@redhat.com > Sent: Saturday, October 29, 2016 2:25:48 PM > Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest > > On Sat, Oct 29, 2016 at 08:21:17AM -0400, Paolo Bonzini wrote: > > 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. > > I don't understand - why can't it be filtered here if needed? I.e., > > return edx & KVM_CPUID_EDX_7_MASK; > > or so? Because then it wouldn't be in processor.h. > Btw, we already have a cpuid_edx() helper in arch/x86/include/asm/processor.h Yes, but it doesn't take an ecx. Anyhow this is not an issue for now. It will depend on which other bits are added to CPUID[7,0].edx, but in general it's relatively rare to blacklist bits from cpufeature. Paolo