[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 6/8] x86: add support for KVM_CAP_XSAVE2 and AMX state mig
From: |
Yang Zhong |
Subject: |
Re: [PATCH v2 6/8] x86: add support for KVM_CAP_XSAVE2 and AMX state migration |
Date: |
Fri, 25 Feb 2022 15:33:12 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Feb 21, 2022 at 01:25:53PM +0000, David Edmondson wrote:
> On Wednesday, 2022-02-16 at 22:04:32 -08, Yang Zhong wrote:
>
> > From: Jing Liu <jing2.liu@intel.com>
> >
> > When dynamic xfeatures (e.g. AMX) are used by the guest, the xsave
> > area would be larger than 4KB. KVM_GET_XSAVE2 and KVM_SET_XSAVE
> > under KVM_CAP_XSAVE2 works with a xsave buffer larger than 4KB.
> > Always use the new ioctls under KVM_CAP_XSAVE2 when KVM supports it.
> >
> > Signed-off-by: Jing Liu <jing2.liu@intel.com>
> > Signed-off-by: Zeng Guang <guang.zeng@intel.com>
> > Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> > target/i386/cpu.h | 4 ++++
> > target/i386/kvm/kvm.c | 42 ++++++++++++++++++++++++--------------
> > target/i386/xsave_helper.c | 33 ++++++++++++++++++++++++++++++
> > 3 files changed, 64 insertions(+), 15 deletions(-)
> >
> > diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> > index f7fc2e97a6..de9da38e42 100644
> > --- a/target/i386/cpu.h
> > +++ b/target/i386/cpu.h
> > @@ -1528,6 +1528,10 @@ typedef struct CPUX86State {
> > uint64_t opmask_regs[NB_OPMASK_REGS];
> > YMMReg zmmh_regs[CPU_NB_REGS];
> > ZMMReg hi16_zmm_regs[CPU_NB_REGS];
> > +#ifdef TARGET_X86_64
> > + uint8_t xtilecfg[64];
> > + uint8_t xtiledata[8192];
> > +#endif
>
> Can we have defined constants for these sizes? They also appear in patch
> 2.
David, the constants we used here are mainly consistent with other members
in this struct and file. thanks!
Yang
- [PATCH v2 3/8] x86: Grant AMX permission for guest, (continued)
- [PATCH v2 3/8] x86: Grant AMX permission for guest, Yang Zhong, 2022/02/17
- [PATCH v2 4/8] x86: Add XFD faulting bit for state components, Yang Zhong, 2022/02/17
- [PATCH v2 5/8] x86: Add AMX CPUIDs enumeration, Yang Zhong, 2022/02/17
- [PATCH v2 6/8] x86: add support for KVM_CAP_XSAVE2 and AMX state migration, Yang Zhong, 2022/02/17
- [PATCH v2 7/8] x86: Support XFD and AMX xsave data migration, Yang Zhong, 2022/02/17
- [PATCH v2 8/8] linux-header: Sync the linux headers, Yang Zhong, 2022/02/17