diff options
author | Aaron Lewis <aaronlewis@google.com> | 2020-10-12 22:47:15 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-08 14:02:15 +0300 |
commit | 29faeb9632012d6c3fa4aa33c3d589b9ff18b206 (patch) | |
tree | 252ab691b354955ae26996659d313ce31fb888c4 /tools/testing/selftests/kvm/lib/kvm_util.c | |
parent | 85f2a4320ef27ce74b9da0631460561028c48756 (diff) | |
download | linux-29faeb9632012d6c3fa4aa33c3d589b9ff18b206.tar.xz |
selftests: kvm: Add exception handling to selftests
Add the infrastructure needed to enable exception handling in selftests.
This allows any of the exception and interrupt vectors to be overridden
in the guest.
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Message-Id: <20201012194716.3950330-4-aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/kvm_util.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 3327cebc1095..be230f3728d5 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -1204,6 +1204,9 @@ int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid) do { rc = ioctl(vcpu->fd, KVM_RUN, NULL); } while (rc == -1 && errno == EINTR); + + assert_on_unhandled_exception(vm, vcpuid); + return rc; } |