kvm: selftests: Add KVM_CAP_MAX_VCPU_ID cap test
PATCH 1/1 kvm: selftests: Add KVM_CAP_MAX_VCPU_ID cap test
Basic test coverage of KVM_CAP_MAX_VCPU_ID cap.
This capability can be enabled before vCPU creation and only allowed to set once. if assigned vcpu id is beyond KVM_CAP_MAX_VCPU_ID capability, vCPU creation will fail.
Signed-off-by Zeng Guang <[email protected]>
---
This patch appends the test case to verify the KVM_CAP_MAX_VCPU_ID cap enabling mechanism introduced in IPI virtualization enabling patch.
https://lore.kernel.org/lkml/[email protected]/
tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../kvm/x86_64/max_vcpuid_cap_test.c | 60 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 tools/testing/selftests/kvm/x86_64/max_vcpuid_cap_test.c
tools/testing/selftests/kvm/.gitignore +1 -0
@@ -22,6 +22,7 @@ /x86_64/hyperv_cpuid /x86_64/hyperv_features /x86_64/hyperv_svm_test +/x86_64/max_vcpuid_cap_test /x86_64/mmio_warning_test /x86_64/mmu_role_test /x86_64/platform_info_test
tools/testing/selftests/kvm/Makefile +1 -0
@@ -86,6 +86,7 @@ TEST_GEN_PROGS_x86_64 += x86_64/xen_shinfo_test TEST_GEN_PROGS_x86_64 += x86_64/xen_vmcall_test TEST_GEN_PROGS_x86_64 += x86_64/sev_migrate_tests TEST_GEN_PROGS_x86_64 += x86_64/amx_test +TEST_GEN_PROGS_x86_64 += x86_64/max_vcpuid_cap_test TEST_GEN_PROGS_x86_64 += access_tracking_perf_test TEST_GEN_PROGS_x86_64 += demand_paging_test TEST_GEN_PROGS_x86_64 += dirty_log_test
tools/testing/selftests/kvm/x86_64/max_vcpuid_cap_test.c new file +60 -0
60 lines not on this page · raw message
Signature · 1 line
2.27.0