[PATCH v2 5/9] KVM: selftests: fix_hypercall_test: Add Zhaoxin CPU support

From: Ewan Hai-oc

Date: Thu Sep 10 2026 - 08:06:36 EST


From: Frank Zhu <frankzhu@xxxxxxxxxxx>

Zhaoxin CPUs use VMCALL as the native hypercall instruction. Use
host_cpu_is_intel_compatible so that fix_hypercall_test selects the
VMX hypercall path on Zhaoxin CPUs.

Signed-off-by: Frank Zhu <frankzhu@xxxxxxxxxxx>
---
tools/testing/selftests/kvm/x86/fix_hypercall_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/x86/fix_hypercall_test.c b/tools/testing/selftests/kvm/x86/fix_hypercall_test.c
index 4931ec227..f11fcc520 100644
--- a/tools/testing/selftests/kvm/x86/fix_hypercall_test.c
+++ b/tools/testing/selftests/kvm/x86/fix_hypercall_test.c
@@ -48,7 +48,7 @@ static void guest_main(void)
const u8 *other_hypercall_insn;
u64 ret;

- if (host_cpu_is_intel) {
+ if (host_cpu_is_intel_compatible) {
native_hypercall_insn = vmx_vmcall;
other_hypercall_insn = svm_vmmcall;
} else if (host_cpu_is_amd_compatible) {
--
2.34.1