All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Piotr Luc <Piotr.Luc@intel.com>,
	kvm@vger.kernel.org, he chen <he.chen@linux.intel.com>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org,
	hpa@zytor.com, mingo@redhat.com,
	Luwei Kang <luwei.kang@intel.com>,
	rkrcmar@redhat.com
Subject: Re: [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest
Date: Sat, 29 Oct 2016 08:21:17 -0400 (EDT)	[thread overview]
Message-ID: <425702906.9319122.1477743677017.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161028122123.24i3synevehn6r3p@pd.tnic>



----- Original Message -----
> From: "Borislav Petkov" <bp@alien8.de>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: "Piotr Luc" <Piotr.Luc@intel.com>, kvm@vger.kernel.org, "he chen" <he.chen@linux.intel.com>,
> linux-kernel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org, hpa@zytor.com, mingo@redhat.com, "Luwei Kang"
> <luwei.kang@intel.com>, rkrcmar@redhat.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

  reply	other threads:[~2016-10-29 12:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  9:12 [PATCH] x86/cpuid: expose AVX512_4VNNIW and AVX512_4FMAPS features to kvm guest He Chen
2016-10-28  9:31 ` Paolo Bonzini
2016-10-28  9:46   ` He Chen
2016-10-28  9:54     ` Paolo Bonzini
2016-10-28  9:55       ` He Chen
2016-10-28 10:13 ` Luc, Piotr
2016-10-28 10:17   ` Paolo Bonzini
2016-10-28 11:08     ` Borislav Petkov
2016-10-28 12:07       ` Paolo Bonzini
2016-10-28 12:21         ` Borislav Petkov
2016-10-29 12:21           ` Paolo Bonzini [this message]
2016-10-29 12:25             ` Borislav Petkov
2016-10-29 12:36               ` Paolo Bonzini
2016-10-29 12:53                 ` Borislav Petkov
2016-10-29 13:20                   ` Paolo Bonzini
2016-10-31  9:15             ` Luc, Piotr
2016-10-31  9:53               ` Borislav Petkov
2016-10-31 10:18                 ` Luc, Piotr
2016-10-31 10:30                   ` Borislav Petkov
2016-10-31 10:47                     ` Paolo Bonzini
2016-10-31 11:05                       ` Borislav Petkov
2016-10-31 11:41                         ` Paolo Bonzini
2016-11-01  7:48                           ` He Chen
2016-11-01  8:46                             ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425702906.9319122.1477743677017.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Piotr.Luc@intel.com \
    --cc=bp@alien8.de \
    --cc=he.chen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luwei.kang@intel.com \
    --cc=mingo@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.