[PATCH v2] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs

Ewan Hai posted 1 patch 1 month, 2 weeks ago
arch/x86/kvm/cpuid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH v2] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs
Posted by Ewan Hai 1 month, 2 weeks ago
Bypass the Centaur-only filter for the CPUID signature leaf so that
processing continues when the CPU vendor is Zhaoxin.

Signed-off-by: Ewan Hai <ewanhai-oc@zhaoxin.com>
---
 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 e2836a255b16..bee8c869259f 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1820,7 +1820,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);
-- 
2.34.1
Re: [PATCH v2] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs
Posted by Sean Christopherson 1 month, 2 weeks ago
On Mon, 18 Aug 2025 04:30:34 -0400, Ewan Hai wrote:
> Bypass the Centaur-only filter for the CPUID signature leaf so that
> processing continues when the CPU vendor is Zhaoxin.

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs
      https://github.com/kvm-x86/linux/commit/1f0654dc75b8

--
https://github.com/kvm-x86/linux/tree/next
Re: [PATCH v2] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs
Posted by Ewan Hai 1 month, 2 weeks ago
On 8/20/25 7:11 AM, Sean Christopherson wrote:
> 
> On Mon, 18 Aug 2025 04:30:34 -0400, Ewan Hai wrote:
>> Bypass the Centaur-only filter for the CPUID signature leaf so that
>> processing continues when the CPU vendor is Zhaoxin.
> 
> Applied to kvm-x86 misc, thanks!

Thank you for your suggestions!

> 
> [1/1] KVM: x86: allow CPUID 0xC000_0000 to proceed on Zhaoxin CPUs
>       https://github.com/kvm-x86/linux/commit/1f0654dc75b8
> 
> --
> https://github.com/kvm-x86/linux/tree/next