(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

KVM: selftests: Check for APIC access virtualization support in said test

Not all CPUs that support VMX necessarily support the "virtualize APIC accesses" secondary processor-based VM-execution control. For example, some Zhaoxin CPUs lack this feature. Add a capability check before running the test to properly skip on unsupported hardware instead of failing. Carve out the guts of kvm_cpu_has_ept() into a generic helper and use said helper to provide kvm_cpu_has_vmx_apic_access_virt(). Signed-off-by: Frank Zhu <frankzhu@zhaoxin.com> Link: https://patch.msgid.link/20260910115414.3015260-10-ewanhai-oc@zhaoxin.com [sean: add a helper instead of copy+pasting kvm_cpu_has_ept()] Signed-off-by: Sean Christopherson <seanjc@google.com>


Author Frank Zhu Committer Sean Christopherson Date Commit Parent 1a0abfad
+19 -8
3 changed files
+19 -8
3 changed files