linux/tools/testing/selftests/kvm/lib/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
..
processor.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
svm.c KVM: selftests: do not substitute SVM/VMX check with KVM_CAP_NESTED_STATE check 2020-06-11 12:35:17 -04:00
ucall.c KVM: selftests: fix ucall on x86 2019-09-25 15:15:03 +02:00
vmx.c KVM: selftests: test behavior of unmapped L2 APIC-access address 2020-10-31 10:04:38 -04:00