[PATCH v2 0/8] Add AVX10.1 CPUID support and GraniteRapids-v2 model

Paolo Bonzini posted 8 patches 3 weeks, 4 days ago
There is a newer version of this series
target/i386/cpu.h         |  16 ++++
target/i386/cpu.c         | 175 ++++++++++++++++++++++++++++++++++----
target/i386/kvm/kvm-cpu.c |   8 --
target/i386/kvm/kvm.c     |   3 +-
4 files changed, 175 insertions(+), 27 deletions(-)
[PATCH v2 0/8] Add AVX10.1 CPUID support and GraniteRapids-v2 model
Posted by Paolo Bonzini 3 weeks, 4 days ago
Most of the patches here are from Tao Su's v1.  The main issue in his
version were two:

- overlooking kvm_cpu_xsave_init(), which currently looks at ExtSaveArea.
  This would get a bit ugly for extended save states that are enabled
  by both AVX512 and AVX10.  Patches 1-2 change kvm_cpu_xsave_init()
  to look at ExtSaveArea's size field instead of testing features.

- downgrading silently to KVM reported value if the avx10_version property
  is >= kvm reported value.  Xiaoyao Li suggested basing this on
  cpu->check_cpuid and cpu->enforce_cpuid.  Also, the check must accept
  any accelerator and not just KVM.  I moved the check to
  x86_cpu_filter_features in patch 4.

I don't have a Granite Rapids machine, so please test! :)

Paolo

Paolo Bonzini (3):
  target/i386: cpu: set correct supported XCR0 features for TCG
  target/i386: do not rely on ExtSaveArea for accelerator-supported XCR0 bits
  target/i386: return bool from x86_cpu_filter_features

Tao Su (5):
  target/i386: add AVX10 feature and AVX10 version property
  target/i386: add CPUID.24 features for AVX10
  target/i386: Add feature dependencies for AVX10
  target/i386: Add AVX512 state when AVX10 is supported
  target/i386: Introduce GraniteRapids-v2 model

 target/i386/cpu.h         |  16 ++++
 target/i386/cpu.c         | 175 ++++++++++++++++++++++++++++++++++----
 target/i386/kvm/kvm-cpu.c |   8 --
 target/i386/kvm/kvm.c     |   3 +-
 4 files changed, 175 insertions(+), 27 deletions(-)

-- 
2.47.0
Re: [PATCH v2 0/8] Add AVX10.1 CPUID support and GraniteRapids-v2 model
Posted by Tao Su 3 weeks, 3 days ago
On Tue, Oct 29, 2024 at 04:18:50PM +0100, Paolo Bonzini wrote:
> Most of the patches here are from Tao Su's v1.  The main issue in his
> version were two:
> 
> - overlooking kvm_cpu_xsave_init(), which currently looks at ExtSaveArea.
>   This would get a bit ugly for extended save states that are enabled
>   by both AVX512 and AVX10.  Patches 1-2 change kvm_cpu_xsave_init()
>   to look at ExtSaveArea's size field instead of testing features.
> 
> - downgrading silently to KVM reported value if the avx10_version property
>   is >= kvm reported value.  Xiaoyao Li suggested basing this on
>   cpu->check_cpuid and cpu->enforce_cpuid.  Also, the check must accept
>   any accelerator and not just KVM.  I moved the check to
>   x86_cpu_filter_features in patch 4.
> 
> I don't have a Granite Rapids machine, so please test! :)

I test it on Granite Rapids and all meet expection with my minor changes on
patch4 :)

> 
> Paolo
> 
> Paolo Bonzini (3):
>   target/i386: cpu: set correct supported XCR0 features for TCG
>   target/i386: do not rely on ExtSaveArea for accelerator-supported XCR0 bits
>   target/i386: return bool from x86_cpu_filter_features
> 
> Tao Su (5):
>   target/i386: add AVX10 feature and AVX10 version property
>   target/i386: add CPUID.24 features for AVX10
>   target/i386: Add feature dependencies for AVX10
>   target/i386: Add AVX512 state when AVX10 is supported
>   target/i386: Introduce GraniteRapids-v2 model
> 
>  target/i386/cpu.h         |  16 ++++
>  target/i386/cpu.c         | 175 ++++++++++++++++++++++++++++++++++----
>  target/i386/kvm/kvm-cpu.c |   8 --
>  target/i386/kvm/kvm.c     |   3 +-
>  4 files changed, 175 insertions(+), 27 deletions(-)
> 
> -- 
> 2.47.0
>
Re: [PATCH v2 0/8] Add AVX10.1 CPUID support and GraniteRapids-v2 model
Posted by Paolo Bonzini 3 weeks, 3 days ago
Il mer 30 ott 2024, 04:23 Tao Su <tao1.su@linux.intel.com> ha scritto:

> > I don't have a Granite Rapids machine, so please test! :)
>
> I test it on Granite Rapids and all meet expection with my minor changes on
> patch4 :)
>

Thanks, can you send v3?

Paolo

>
> > Paolo
> >
> > Paolo Bonzini (3):
> >   target/i386: cpu: set correct supported XCR0 features for TCG
> >   target/i386: do not rely on ExtSaveArea for accelerator-supported XCR0
> bits
> >   target/i386: return bool from x86_cpu_filter_features
> >
> > Tao Su (5):
> >   target/i386: add AVX10 feature and AVX10 version property
> >   target/i386: add CPUID.24 features for AVX10
> >   target/i386: Add feature dependencies for AVX10
> >   target/i386: Add AVX512 state when AVX10 is supported
> >   target/i386: Introduce GraniteRapids-v2 model
> >
> >  target/i386/cpu.h         |  16 ++++
> >  target/i386/cpu.c         | 175 ++++++++++++++++++++++++++++++++++----
> >  target/i386/kvm/kvm-cpu.c |   8 --
> >  target/i386/kvm/kvm.c     |   3 +-
> >  4 files changed, 175 insertions(+), 27 deletions(-)
> >
> > --
> > 2.47.0
> >
>
>
Re: [PATCH v2 0/8] Add AVX10.1 CPUID support and GraniteRapids-v2 model
Posted by Tao Su 3 weeks, 3 days ago
On Wed, Oct 30, 2024 at 09:35:43AM +0100, Paolo Bonzini wrote:
> Il mer 30 ott 2024, 04:23 Tao Su <tao1.su@linux.intel.com> ha scritto:
> 
> > > I don't have a Granite Rapids machine, so please test! :)
> >
> > I test it on Granite Rapids and all meet expection with my minor changes on
> > patch4 :)
> >
> 
> Thanks, can you send v3?

Sure, I will.