linux-next/tools/testing/selftests/kvm
Ivan Orlov 62e41f6b4f KVM: selftests: Add test case for MMIO during vectoring on x86
Extend the 'set_memory_region_test' with an x86-only test case which
covers emulated MMIO during event vectoring error handling. The test case

1) Sets an IDT descriptor base to point to an MMIO address
2) Generates a #GP in the guest
3) Verifies userspace gets the correct exit reason, suberror code, and
   GPA in internal.data[3]

Opportunistically add a definition for a non-canonical address to
processor.h so that the source of the #GP is somewhat self-documenting,
and so that future tests don't have to reinvent the wheel.

Signed-off-by: Ivan Orlov <iorlov@amazon.com>
Link: https://lore.kernel.org/r/20241217181458.68690-8-iorlov@amazon.com
[sean: massage changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-12-18 15:14:47 -08:00
..
arm64 KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories 2024-12-18 14:15:04 -08:00
include KVM: selftests: Add test case for MMIO during vectoring on x86 2024-12-18 15:14:47 -08:00
lib KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories 2024-12-18 14:15:04 -08:00
riscv KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param 2024-12-18 14:14:14 -08:00
s390 KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories 2024-12-18 14:15:04 -08:00
x86 KVM: selftests: Add and use a helper function for x86's LIDT 2024-12-18 15:14:46 -08: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 Merge remote-tracking branch 'kvm/queue' into HEAD 2022-12-12 15:54:07 -05:00
arch_timer.c Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h" 2024-04-29 12:54:13 -07:00
coalesced_io_test.c KVM: selftests: Add a test for coalesced MMIO (and PIO on x86) 2024-08-29 19:38:33 -07:00
config KVM: selftests: Fixup config fragment for access_tracking_perf_test 2023-03-30 19:27:56 +01:00
demand_paging_test.c KVM selftests treewide updates for 6.10: 2024-05-12 03:18:11 -04:00
dirty_log_perf_test.c KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories 2024-12-18 14:15:04 -08:00
dirty_log_test.c Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h" 2024-04-29 12:54:13 -07:00
get-reg-list.c KVM: selftests: Remove redundant newlines 2024-01-29 08:39:14 -08:00
guest_memfd_test.c KVM: selftests: fix unintentional noop test in guest_memfd_test.c 2024-11-04 21:10:28 -08:00
guest_print_test.c KVM: selftests: Open code vcpu_run() equivalent in guest_printf test 2024-08-29 16:25:06 -07:00
hardware_disable_test.c KVM: selftests: Remove unused macro in the hardware disable test 2024-10-30 13:51:46 -07:00
kvm_binary_stats_test.c KVM: selftests: Define _GNU_SOURCE for all selftests code 2024-04-29 12:49:10 -07:00
kvm_create_max_vcpus.c KVM: selftests: Define _GNU_SOURCE for all selftests code 2024-04-29 12:49:10 -07:00
kvm_page_table_test.c Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h" 2024-04-29 12:54:13 -07:00
Makefile KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR 2024-12-18 14:15:05 -08:00
Makefile.kvm KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR 2024-12-18 14:15:05 -08:00
memslot_modification_stress_test.c KVM: selftests: Fix build on architectures other than x86_64 2024-10-01 11:07:26 -04:00
memslot_perf_test.c KVM: selftests: memslot_perf_test: increase guest sync timeout 2024-11-04 21:04:10 -08:00
mmu_stress_test.c KVM: selftests: Verify KVM correctly handles mprotect(PROT_READ) 2024-12-18 14:15:02 -08:00
pre_fault_memory_test.c KVM: selftests: x86: Add test for KVM_PRE_FAULT_MEMORY 2024-07-12 11:18:27 -04:00
rseq_test.c KVM selftests treewide updates for 6.10: 2024-05-12 03:18:11 -04:00
set_memory_region_test.c KVM: selftests: Add test case for MMIO during vectoring on x86 2024-12-18 15:14:47 -08:00
settings selftests: kvm: Raise the default timeout to 120 seconds 2021-02-09 08:17:08 -05:00
steal_time.c KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param 2024-12-18 14:14:14 -08:00
system_counter_offset_test.c KVM: selftests: Remove redundant newlines 2024-01-29 08:39:14 -08:00