Re: [PATCH 0/4] KVM: selftests: ioctl() macro cleanups

From: Sean Christopherson
Date: Fri Aug 04 2023 - 11:25:34 EST


+KVM (good job me)

On Thu, Aug 03, 2023, Sean Christopherson wrote:
> Do some minor housekeeping on the ioctl() macros, and then teach them
> to detect and report when an ioctl() unexpectedly fails because KVM has
> killed and/or bugged the VM.
>
> Note, I'm 50/50 on whether or not the ARM patch is worthwhile, though I
> spent a stupid amount of time on it (don't ask), so darn it I'm at least
> posting it.
>
> Oh, and the To: will probably show up funky, but I'd like to take this
> through kvm-x86/selftests, not the ARM tree.
>
> Thanks!
>
> Sean Christopherson (4):
> KVM: selftests: Drop the single-underscore ioctl() helpers
> KVM: selftests: Add helper macros for ioctl()s that return file
> descriptors
> KVM: selftests: Use asserting kvm_ioctl() macros when getting ARM page
> sizes
> KVM: selftests: Add logic to detect if ioctl() failed because VM was
> killed
>
> .../selftests/kvm/include/kvm_util_base.h | 101 ++++++++++++------
> .../selftests/kvm/lib/aarch64/processor.c | 18 ++--
> tools/testing/selftests/kvm/lib/kvm_util.c | 17 +--
> 3 files changed, 84 insertions(+), 52 deletions(-)
>
>
> base-commit: 240f736891887939571854bd6d734b6c9291f22e
> --
> 2.41.0.585.gd2178a4bd4-goog
>