]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Call a dummy helper in VM/vCPU ioctls() to enforce type
authorSean Christopherson <seanjc@google.com>
Mon, 13 Jun 2022 16:19:40 +0000 (16:19 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2022 16:44:46 +0000 (12:44 -0400)
commit846e7b13056f12b10fbb3671dae05f22d08cc537
treeca8fb7f421b1af37becb90e2c0955a4fb3e3ead5
parent82661c45f98cb7312c59d3da3e7ab7269793b670
KVM: selftests: Call a dummy helper in VM/vCPU ioctls() to enforce type

Replace the goofy static_assert on the size of the @vm/@vcpu parameters
with a call to a dummy helper, i.e. let the compiler naturally complain
about an incompatible type instead of homebrewing a poor replacement.

Reported-by: Andrew Jones <drjones@redhat.com>
Fixes: 8696765eb3d8 ("KVM: selftests: Sanity check input to ioctls() at build time")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220613161942.1586791-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/kvm_util_base.h