selftests: KVM: Add helpers for vCPU device attributes
authorOliver Upton <oupton@google.com>
Thu, 16 Sep 2021 18:15:50 +0000 (18:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Oct 2021 18:43:46 +0000 (14:43 -0400)
commitc895513453268c8911858e17713fb94d9e0eae50
tree0c1f71ed7c49cbf514612e672470b893b0a6e70f
parentc1901feef5bbe87713815ad0eff6331ae7225973
selftests: KVM: Add helpers for vCPU device attributes

vCPU file descriptors are abstracted away from test code in KVM
selftests, meaning that tests cannot directly access a vCPU's device
attributes. Add helpers that tests can use to get at vCPU device
attributes.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20210916181555.973085-5-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c