[PATCH 4/8] KVM: selftests: fix_hypercall_test: Add Zhaoxin CPU support

"Ewan Hai-oc" <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.