From: Frank Zhu <[email protected]>

The vmx_exception_with_invalid_guest_state test currently requires an
Intel CPU. However, Zhaoxin CPUs also support VMX and the relevant
invalid guest state handling under KVM.

Update the test requirement to allow execution on Zhaoxin platforms in
addition to Intel, enabling broader coverage of VMX-related error paths.

Signed-off-by: Frank Zhu <[email protected]>
Signed-off-by: Ewan Hai <[email protected]>
---
 .../selftests/kvm/x86/vmx_exception_with_invalid_guest_state.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_state.c 
b/tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_state.c
index 2cae86d9d5e2..e95dc4cd8adb 100644
--- a/tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_state.c
+++ b/tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_state.c
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
        struct kvm_vcpu *vcpu;
        struct kvm_vm *vm;
 
-       TEST_REQUIRE(host_cpu_is_intel);
+       TEST_REQUIRE(host_cpu_is_intel || host_cpu_is_zx);
        TEST_REQUIRE(!kvm_is_unrestricted_guest_enabled());
 
        vm = vm_create_with_one_vcpu(&vcpu, guest_code);
-- 
2.34.1



Reply via email to