]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Add exception handling support for aarch64
authorRicardo Koller <ricarkol@google.com>
Thu, 13 May 2021 00:28:01 +0000 (17:28 -0700)
committerMarc Zyngier <maz@kernel.org>
Tue, 1 Jun 2021 08:50:07 +0000 (09:50 +0100)
commitcc968fa1dd8212557c588f348d37d907008117e8
tree2fb214ddd5fb7dd8046e637395215d86e9b3c3bd
parent124d7bb43462d1b4eaee2463fcbc7e9e41cac20f
KVM: selftests: Add exception handling support for aarch64

Add the infrastructure needed to enable exception handling in aarch64
selftests. The exception handling defaults to an unhandled-exception
handler which aborts the test, just like x86. These handlers can be
overridden by calling vm_install_vector_handler(vector) or
vm_install_exception_handler(vector, ec). The unhandled exception
reporting from the guest is done using the ucall type introduced in a
previous commit, UCALL_UNHANDLED.

The exception handling code is heavily inspired on kvm-unit-tests.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210513002802.3671838-5-ricarkol@google.com
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/include/aarch64/processor.h
tools/testing/selftests/kvm/lib/aarch64/handlers.S [new file with mode: 0644]
tools/testing/selftests/kvm/lib/aarch64/processor.c