linux/tools/testing/selftests/kvm/x86_64
Jim Mattson 97a71a5455 KVM: selftests: test behavior of unmapped L2 APIC-access address
Add a regression test for commit 671ddc700f ("KVM: nVMX: Don't leak
L1 MMIO regions to L2").

First, check to see that an L2 guest can be launched with a valid
APIC-access address that is backed by a page of L1 physical memory.

Next, set the APIC-access address to a (valid) L1 physical address
that is not backed by memory. KVM can't handle this situation, so
resuming L2 should result in a KVM exit for internal error
(emulation).

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Message-Id: <20201026180922.3120555-1-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-31 10:04:38 -04:00
..
cr4_cpuid_sync_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
debug_regs.c selftests: kvm: Fix assert failure in single-step test 2020-09-23 10:23:56 -04:00
evmcs_test.c KVM: selftests: Don't probe KVM_CAP_HYPERV_ENLIGHTENED_VMCS when nested VMX is unsupported 2020-06-11 12:35:18 -04:00
hyperv_cpuid.c KVM: selftests: Don't probe KVM_CAP_HYPERV_ENLIGHTENED_VMCS when nested VMX is unsupported 2020-06-11 12:35:18 -04:00
mmio_warning_test.c KVM: selftests: Use consistent message for test skipping 2020-03-16 17:59:05 +01:00
platform_info_test.c KVM: selftests: Use consistent message for test skipping 2020-03-16 17:59:05 +01:00
set_sregs_test.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
smm_test.c KVM: selftests: fix sync_with_host() in smm_test 2020-06-11 12:35:19 -04:00
state_test.c KVM: selftests: do not substitute SVM/VMX check with KVM_CAP_NESTED_STATE check 2020-06-11 12:35:17 -04:00
svm_vmcall_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
sync_regs_test.c KVM: selftests: Use consistent message for test skipping 2020-03-16 17:59:05 +01:00
tsc_msrs_test.c KVM: x86: do not attempt TSC synchronization on guest writes 2020-09-28 07:59:52 -04:00
user_msr_test.c KVM: selftests: Add test for user space MSR handling 2020-09-28 07:58:45 -04:00
vmx_apic_access_test.c KVM: selftests: test behavior of unmapped L2 APIC-access address 2020-10-31 10:04:38 -04:00
vmx_close_while_nested_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
vmx_dirty_log_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
vmx_preemption_timer_test.c KVM: selftests: fix vmx_preemption_timer_test build with GCC10 2020-06-08 07:59:43 -04:00
vmx_set_nested_state_test.c KVM: nVMX: check for invalid hdr.vmx.flags 2020-07-27 09:04:50 -04:00
vmx_tsc_adjust_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
xss_msr_test.c KVM: selftests: Use consistent message for test skipping 2020-03-16 17:59:05 +01:00