diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-09 13:06:57 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 11:46:23 -0400 |
commit | 4091818426d98f4e7093808264caf86ad90287c8 (patch) | |
tree | 9546cbd35f40f7f4908ec75aba2b1da058a165a2 /tools/testing/selftests/kvm/system_counter_offset_test.c | |
parent | d2752e2eb331cbbed6f51f901f2685654e1cafa7 (diff) | |
download | linux-4091818426d98f4e7093808264caf86ad90287c8.tar.bz2 |
KVM: selftests: Split get/set device_attr helpers
Split the get/set device_attr helpers instead of using a boolean param to
select between get and set. Duplicating upper level wrappers is a very,
very small price to pay for improved readability, and having constant (at
compile time) inputs will allow the selftests framework to sanity check
ioctl() invocations.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/system_counter_offset_test.c')
-rw-r--r-- | tools/testing/selftests/kvm/system_counter_offset_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/system_counter_offset_test.c b/tools/testing/selftests/kvm/system_counter_offset_test.c index 2b10c53abf4f..5dd9d28efb97 100644 --- a/tools/testing/selftests/kvm/system_counter_offset_test.c +++ b/tools/testing/selftests/kvm/system_counter_offset_test.c @@ -39,8 +39,8 @@ static void check_preconditions(struct kvm_vm *vm) static void setup_system_counter(struct kvm_vm *vm, struct test_case *test) { - vcpu_access_device_attr(vm, VCPU_ID, KVM_VCPU_TSC_CTRL, - KVM_VCPU_TSC_OFFSET, &test->tsc_offset, true); + vcpu_device_attr_set(vm, VCPU_ID, KVM_VCPU_TSC_CTRL, + KVM_VCPU_TSC_OFFSET, &test->tsc_offset); } static uint64_t guest_read_system_counter(struct test_case *test) |