linux/tools/testing/selftests/kvm
David Woodhouse f148dd411d KVM: selftests: sev_init2_tests: Derive SEV availability from KVM
The test asserted that the X86_FEATURE_SEV CPUID bit exactly matches
whether KVM offers KVM_X86_SEV_VM.  That is not an invariant: when all
SEV ASIDs are assigned to SEV-SNP, KVM does not offer the SEV VM type
even though CPUID reports SEV, so the test aborts on an SNP-only host.

Derive SEV availability from KVM_CAP_VM_TYPES (as already done for SEV-ES
and SNP), assert only the one-way implication that a type offered by KVM
is also reported in CPUID, and TEST_REQUIRE() the SEV VM type so the test
skips cleanly when it is unavailable.

Reviewed-by: Tycho Andersen (AMD) <tycho@kernel.org>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-ID: <5d3c345113748f39b7982e365d241abaf3e11086.1784545391.git.dwmw@amazon.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-07-21 12:25:27 +02:00
..
arm64 KVM: arm64: selftests: Add MMIO sign-extending load test 2026-07-06 17:18:34 +01:00
include KVM: s390: Fix S390_USER_OPEREXEC and more gmap fixes 2026-06-24 13:41:41 +02:00
lib KVM selftests changes for 7.2 2026-06-12 10:12:22 +02:00
loongarch KVM: selftests: Use u32 instead of uint32_t 2026-04-20 14:54:16 -07:00
riscv KVM: riscv: selftests: Split SBI FWFT into separate feature-specific sublists 2026-06-05 21:38:58 +05:30
s390 KVM: s390: selftests: Fix cmma selftest 2026-06-24 10:08:57 +02:00
x86 KVM: selftests: sev_init2_tests: Derive SEV availability from KVM 2026-07-21 12:25:27 +02:00
.gitignore KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs 2024-12-18 14:15:03 -08:00
access_tracking_perf_test.c KVM: selftests: Include sys/mman.h *and* linux/mman.h, via kvm_syscalls.h 2026-05-13 09:53:43 -07:00
arch_timer.c KVM: selftests: Use u32 instead of uint32_t 2026-04-20 14:54:16 -07:00
coalesced_io_test.c KVM: selftests: Use u8 instead of uint8_t 2026-04-20 14:54:17 -07:00
config KVM: selftests: Add CONFIG_EVENTFD for irqfd selftest 2025-07-10 06:20:20 -07:00
demand_paging_test.c KVM: selftests: Use u64 instead of uint64_t 2026-04-20 14:54:16 -07:00
dirty_log_perf_test.c KVM: selftests: Use u32 instead of uint32_t 2026-04-20 14:54:16 -07:00
dirty_log_test.c KVM: selftests: Randomize dirty_log_test's delay before reaping the bitmap 2026-05-26 12:24:33 -07:00
get-reg-list.c KVM: selftests: Use u8 instead of uint8_t 2026-04-20 14:54:17 -07:00
guest_memfd_test.c KVM guest_memfd changes for 7.2 2026-06-12 10:08:52 +02:00
guest_print_test.c KVM: selftests: Use u32 instead of uint32_t 2026-04-20 14:54:16 -07:00
hardware_disable_test.c KVM: selftests: Use u32 instead of uint32_t 2026-04-20 14:54:16 -07:00
irqfd_test.c KVM: selftests: Fix irqfd_test for non-x86 architectures 2025-10-13 14:17:03 +01:00
kvm_binary_stats_test.c KVM: selftests: Define wrappers for common syscalls to assert success 2025-10-20 06:30:42 -07:00
kvm_create_max_vcpus.c KVM: selftests: Adjust number of files rlimit for all "standard" VMs 2025-02-14 07:02:12 -08:00
kvm_page_table_test.c KVM: selftests: Add a hugetlb memslot alignment test mode 2026-06-07 11:16:18 +05:30
Makefile KVM: selftests: Forcefully override ARCH from x86_64 to x86 2025-10-20 08:55:24 -07:00
Makefile.kvm KVM/arm64 fixes for 7.2, take #2 2026-07-15 12:13:30 +02:00
memslot_modification_stress_test.c KVM: selftests: Replace "u64 gpa" with "gpa_t" throughout 2026-04-20 14:54:17 -07:00
memslot_perf_test.c KVM selftests changes for 7.2 2026-06-12 10:12:22 +02:00
mmu_stress_test.c KVM: selftests: Replace "u64 gpa" with "gpa_t" throughout 2026-04-20 14:54:17 -07:00
pre_fault_memory_test.c KVM: selftests: Fix pre_fault_memory_test to run on s390 2026-05-28 13:05:53 +02:00
rseq_test.c KVM: selftests: Add missing "break" in rseq_test's param parsing 2025-12-02 08:49:10 -08:00
set_memory_region_test.c KVM guest_memfd changes for 7.2 2026-06-12 10:08:52 +02:00
settings
steal_time.c KVM: selftests: arm64: Fix steal_time test after UAPI refactoring 2026-05-06 17:09:03 +01:00
system_counter_offset_test.c KVM: selftests: Use u64 instead of uint64_t 2026-04-20 14:54:16 -07:00