From: Frank Zhu <[email protected]>

Zhaoxin CPUs offer a VMX-compatible interface with the same VMCALL
instruction as Intel CPUs for hypercalls. Add host_cpu_is_zx to the
Intel branch to allow the test to run correctly on Zhaoxin hardware.

Signed-off-by: Frank Zhu <[email protected]>
Signed-off-by: Ewan Hai <[email protected]>
---
 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 753a0e730ea8..0fb75ad1715f 100644
--- a/tools/testing/selftests/kvm/x86/fix_hypercall_test.c
+++ b/tools/testing/selftests/kvm/x86/fix_hypercall_test.c
@@ -49,7 +49,7 @@ static void guest_main(void)
        const u8 *other_hypercall_insn;
        u64 ret;
 
-       if (host_cpu_is_intel) {
+       if (host_cpu_is_intel || host_cpu_is_zx) {
                native_hypercall_insn = vmx_vmcall;
                other_hypercall_insn  = svm_vmmcall;
        } else if (host_cpu_is_amd_compatible) {
-- 
2.34.1



Reply via email to