[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251120050720.931449-4-zhao1.liu@intel.com>
Date: Thu, 20 Nov 2025 13:07:19 +0800
From: Zhao Liu <zhao1.liu@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Chao Gao <chao.gao@...el.com>,
Zhao Liu <zhao1.liu@...el.com>,
Xudong Hao <xudong.hao@...el.com>
Subject: [PATCH 3/4] KVM: x86: Advertise AVX10.2 CPUID to userspace
Bump up the maximum supported AVX10 version and pass AVX10.2 through to
the guest.
Intel AVX10 Version 2 (Intel AVX10.2) includes a suite of new
instructions delivering new AI features and performance, accelerated
media processing, expanded Web Assembly, and Cryptography support, along
with enhancements to existing legacy instructions for completeness and
efficiency, and it is enumerated as version 2 in CPUID 0x24.0x0.EBX[bits
0-7] [1].
AVX10.2 has no current kernel usage and requires no additional host
kernel enabling work (based on AVX10.1 support) and provides no new
VMX controls [2]. Moreover, since AVX10.2 is the superset of AVX10.1,
there's no need to worry about AVX10.1 and AVX10.2 compatibility issues
in KVM.
Therefore, it's safe to advertise AVX10.2 version to userspace directly
if host supports AVX10.2.
[1]: Intel Advanced Vector Extensions 10.2 Architecture Specification
(rev 5.0).
[2]: Note: Since AVX10.2 spec (rev 4.0), it has been declared "AVX10/512
will be used in all Intel products, supporting vector lengths of
128, 256, and 512 in all product lines", and the VMX support (in
earlier revisions) for AVX10/256 guest on AVX10/512 host has been
dropped.
Tested-by: Xudong Hao <xudong.hao@...el.com>
Signed-off-by: Zhao Liu <zhao1.liu@...el.com>
---
Reference link: https://cdrdv2.intel.com/v1/dl/getContent/856721
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 0795c9ecfd4b..984fbee2795e 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1655,7 +1655,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
* is guaranteed to be >=1 if AVX10 is supported. Note #2, the
* version needs to be captured before overriding EBX features!
*/
- avx10_version = min_t(u8, entry->ebx & 0xff, 1);
+ avx10_version = min_t(u8, entry->ebx & 0xff, 2);
cpuid_entry_override(entry, CPUID_24_0_EBX);
entry->ebx |= avx10_version;
--
2.34.1
Powered by blists - more mailing lists