From 47ce857aa25245f7cae90b300634aef108f43f10 Mon Sep 17 00:00:00 2001 From: LeoLiu-oc Date: Tue, 21 Oct 2025 11:20:58 +0800 Subject: [PATCH] x86/kvm: expose CPUID 0xC000_0000 for Zhaoxin "Shanghai" vendor zhaoxin inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ID2SHO CVE: NA -------------------- Both vendor IDs used by Zhaoxin(" Shanghai " and "Centaurhauls") rely on leaf 0XC000_0000 to advertise the max 0xC000_00XX function. Extend KVM so the leaf is returned for either ID. Reviewed-by: Ewan Hai Tested-by: Lyle Li Signed-off-by: LeoLiu-oc --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0502a6b59a140..7d93f00961d69 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -1427,7 +1427,8 @@ static int get_cpuid_func(struct kvm_cpuid_array *array, u32 func, int r; if (func == CENTAUR_CPUID_SIGNATURE && - boot_cpu_data.x86_vendor != X86_VENDOR_CENTAUR) + boot_cpu_data.x86_vendor != X86_VENDOR_CENTAUR && + boot_cpu_data.x86_vendor != X86_VENDOR_ZHAOXIN) return 0; r = do_cpuid_func(array, func, type); -- Gitee