public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Tao Su <tao1.su@linux.intel.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, xiaoyao.li@intel.com
Subject: Re: [PATCH] KVM: x86: Advertise AMX-COMPLEX CPUID to userspace
Date: Wed, 2 Aug 2023 16:36:10 -0700	[thread overview]
Message-ID: <ZMroatylDm1b5+WJ@google.com> (raw)
In-Reply-To: <20230802022954.193843-1-tao1.su@linux.intel.com>

On Wed, Aug 02, 2023, Tao Su wrote:
> Latest Intel platform GraniteRapids-D introduces AMX-COMPLEX, which adds
> two instructions to perform matrix multiplication of two tiles containing
> complex elements and accumulate the results into a packed single precision
> tile.
> 
> AMX-COMPLEX is enumerated via CPUID.(EAX=7,ECX=1):EDX[bit 8]
> 
> Since there are no new VMX controls or additional host enabling required
> for guests to use this feature, advertise the CPUID to userspace.

Nit, I would rather justify this (last paragraph) with something like:

  Advertise AMX_COMPLEX if it's supported in hardware.  There are no VMX
  controls for the feature, i.e. the instructions can't be interecepted, and
  KVM advertises base AMX in CPUID if AMX is supported in hardware, even if
  KVM doesn't advertise AMX as being supported in XCR0, e.g. because the
  process didn't opt-in to allocating tile data.

If the above is accurate and there are no objections, I'll fixup the changelog
when applying.

Side topic, this does make me wonder if advertising AMX when XTILE_DATA isn't
permitted is a bad idea.  But no one has complained, and chasing down all the
dependent AMX features would get annoying, so I'm inclined to keep the status quo.

  parent reply	other threads:[~2023-08-02 23:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  2:29 [PATCH] KVM: x86: Advertise AMX-COMPLEX CPUID to userspace Tao Su
2023-08-02  7:40 ` Xiaoyao Li
2023-08-02 23:36 ` Sean Christopherson [this message]
2023-08-03  3:12   ` Xiaoyao Li
2023-08-03  3:26   ` Tao Su
2023-08-03 21:04   ` Paolo Bonzini
2023-08-04  0:40 ` Sean Christopherson
2023-08-04  6:58   ` Tao Su

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=ZMroatylDm1b5+WJ@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=tao1.su@linux.intel.com \
    --cc=xiaoyao.li@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox