]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 00:55:35 +0000 (16:55 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:14:54 +0000 (14:14 -0800)
commitd6533c15133867cd3032bcab7f839ae5d53d0e70
tree7ee6c01baa3bb56d3b23360f83427ee282ff9b7f
parentfe85ce31b2891611a2e4d788872be815cea85a4b
KVM: selftests: Check for a potential unhandled exception iff KVM_RUN succeeded

Don't check for an unhandled exception if KVM_RUN failed, e.g. if it
returned errno=EFAULT, as reporting unhandled exceptions is done via a
ucall, i.e. requires KVM_RUN to exit cleanly.  Theoretically, checking
for a ucall on a failed KVM_RUN could get a false positive, e.g. if there
were stale data in vcpu->run from a previous exit.

Reviewed-by: James Houghton <jthoughton@google.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20241128005547.4077116-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/lib/kvm_util.c