Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756539AbcJ2Miz (ORCPT ); Sat, 29 Oct 2016 08:38:55 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:38423 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbcJ2Mix (ORCPT ); Sat, 29 Oct 2016 08:38:53 -0400 Date: Sat, 29 Oct 2016 08:36:11 -0400 (EDT) From: Paolo Bonzini To: Borislav Petkov 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 Message-ID: <1409336705.9320510.1477744571210.JavaMail.zimbra@redhat.com> In-Reply-To: <20161029122548.niyvh2q3kuvyqwo3@pd.tnic> 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> Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.164.1, 10.5.101.130] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF49 (Linux)/8.0.6_GA_5922) Thread-Topic: x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest Thread-Index: OsEEKFakLWvMpESen+RGVVWTUKkybw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1318 Lines: 34 ----- 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