All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Zhong <yang.zhong@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: yang.zhong@intel.com, "Christopherson, ,
	Sean" <seanjc@google.com>,
	"jing2.liu@linux.intel.com" <jing2.liu@linux.intel.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Wang, Wei W" <wei.w.wang@intel.com>,
	"Zeng, Guang" <guang.zeng@intel.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>
Subject: Re: [RFC PATCH 2/7] x86: Add AMX XTILECFG and XTILEDATA components
Date: Tue, 11 Jan 2022 10:32:06 +0800	[thread overview]
Message-ID: <20220111023206.GB10706@yangzhon-Virtual> (raw)
In-Reply-To: <BN9PR11MB5276EA0D1E39DDA511B0A9B38C509@BN9PR11MB5276.namprd11.prod.outlook.com>

On Mon, Jan 10, 2022 at 04:23:47PM +0800, Tian, Kevin wrote:
> > From: Zhong, Yang <yang.zhong@intel.com>
> > Sent: Friday, January 7, 2022 5:31 PM
> >
> > From: Jing Liu <jing2.liu@intel.com>
> >
> > AMX XTILECFG and XTILEDATA are managed by XSAVE feature
> > set. State component 17 is used for 64-byte TILECFG register
> > (XTILECFG state) and component 18 is used for 8192 bytes
> > of tile data (XTILEDATA state).
> 
> to be consistent, "tile data" -> "TILEDATA"
> 
> >
> > Add AMX feature bits to x86_ext_save_areas array to set
> > up AMX components. Add structs that define the layout of
> > AMX XSAVE areas and use QEMU_BUILD_BUG_ON to validate the
> > structs sizes.
> >
> > Signed-off-by: Jing Liu <jing2.liu@intel.com>
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> >  target/i386/cpu.h | 16 +++++++++++++++-
> >  target/i386/cpu.c |  8 ++++++++
> >  2 files changed, 23 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> > index 7f9700544f..768a8218be 100644
> > --- a/target/i386/cpu.h
> > +++ b/target/i386/cpu.h
> > @@ -537,6 +537,8 @@ typedef enum X86Seg {
> >  #define XSTATE_ZMM_Hi256_BIT            6
> >  #define XSTATE_Hi16_ZMM_BIT             7
> >  #define XSTATE_PKRU_BIT                 9
> > +#define XSTATE_XTILE_CFG_BIT            17
> > +#define XSTATE_XTILE_DATA_BIT           18
> >
> >  #define XSTATE_FP_MASK                  (1ULL << XSTATE_FP_BIT)
> >  #define XSTATE_SSE_MASK                 (1ULL << XSTATE_SSE_BIT)
> > @@ -1343,6 +1345,16 @@ typedef struct XSavePKRU {
> >      uint32_t padding;
> >  } XSavePKRU;
> >
> > +/* Ext. save area 17: AMX XTILECFG state */
> > +typedef struct XSaveXTILE_CFG {
> 
> remove "_"?
> 
> > +    uint8_t xtilecfg[64];
> > +} XSaveXTILE_CFG;
> > +
> > +/* Ext. save area 18: AMX XTILEDATA state */
> > +typedef struct XSaveXTILE_DATA {
> 
> ditto
>

  Thanks Kevin, I will update this in new version.

  Yang 


  reply	other threads:[~2022-01-11  2:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07  9:31 [RFC PATCH 0/7] AMX support in Qemu Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 1/7] x86: Fix the 64-byte boundary enumeration for extended state Yang Zhong
2022-01-10  8:20   ` Tian, Kevin
2022-01-11  2:22     ` Yang Zhong
2022-01-18 12:37       ` Paolo Bonzini
2022-01-21  7:14         ` Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 2/7] x86: Add AMX XTILECFG and XTILEDATA components Yang Zhong
2022-01-10  8:23   ` Tian, Kevin
2022-01-11  2:32     ` Yang Zhong [this message]
2022-01-18 12:39     ` Paolo Bonzini
2022-01-21  7:15       ` Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 3/7] x86: Grant AMX permission for guest Yang Zhong
2022-01-10  8:36   ` Tian, Kevin
2022-01-11  6:46     ` Yang Zhong
2022-01-18 12:52   ` Paolo Bonzini
2022-01-18 13:06     ` Paolo Bonzini
2022-01-21  7:21       ` Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 4/7] x86: Add XFD faulting bit for state components Yang Zhong
2022-01-10  8:38   ` Tian, Kevin
2022-01-11  5:32     ` Yang Zhong
2022-01-18 12:52   ` Paolo Bonzini
2022-01-21  7:18     ` Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 5/7] x86: Add AMX CPUIDs enumeration Yang Zhong
2022-01-07  9:31 ` [RFC PATCH 6/7] x86: Use new XSAVE ioctls handling Yang Zhong
2022-01-10  8:40   ` Tian, Kevin
2022-01-10  9:47     ` Zeng Guang
2022-01-11  2:30       ` Tian, Kevin
2022-01-11  4:29         ` Zeng Guang
2022-01-12  2:51         ` Zeng Guang
2022-01-12  4:34           ` Wang, Wei W
2022-01-07  9:31 ` [RFC PATCH 7/7] x86: Support XFD and AMX xsave data migration Yang Zhong

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=20220111023206.GB10706@yangzhon-Virtual \
    --to=yang.zhong@intel.com \
    --cc=guang.zeng@intel.com \
    --cc=jing2.liu@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seanjc@google.com \
    --cc=wei.w.wang@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 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.