diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-02 13:19:09 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 11:46:26 -0400 |
commit | a12c86c447f4bce6d2725c3fab426aba6630b376 (patch) | |
tree | f11dfdf5a35e9c014cb13420cbdf66780b6761cf /tools/testing/selftests/kvm/lib/kvm_util.c | |
parent | KVM: selftests: Consolidate KVM_ENABLE_CAP usage (diff) | |
download | linux-dev-a12c86c447f4bce6d2725c3fab426aba6630b376.tar.xz linux-dev-a12c86c447f4bce6d2725c3fab426aba6630b376.zip |
KVM: selftests: Simplify KVM_ENABLE_CAP helper APIs
Rework the KVM_ENABLE_CAP helpers to take the cap and arg0; literally
every current user, and likely every future user, wants to set 0 or 1
arguments and nothing else.
Signed-off-by: Sean Christopherson <seanjc@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 | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 2d82b5720737..8f670cef6faa 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c @@ -85,11 +85,7 @@ int kvm_check_cap(long cap) void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size) { - struct kvm_enable_cap cap = { 0 }; - - cap.cap = KVM_CAP_DIRTY_LOG_RING; - cap.args[0] = ring_size; - vm_enable_cap(vm, &cap); + vm_enable_cap(vm, KVM_CAP_DIRTY_LOG_RING, ring_size); vm->dirty_ring_size = ring_size; } |