aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/include/x86_64/processor.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-06-14 20:06:45 +0000
committerSean Christopherson <seanjc@google.com>2022-07-13 18:14:15 -0700
commit8b02674103e6f09f9f9397bfb7bfd60a9323c9c2 (patch)
treedbb26ad6773b01235adac542188d2572adae324c /tools/testing/selftests/kvm/include/x86_64/processor.h
parentKVM: selftests: Don't use a static local in vcpu_get_supported_hv_cpuid() (diff)
downloadlinux-dev-8b02674103e6f09f9f9397bfb7bfd60a9323c9c2.tar.xz
linux-dev-8b02674103e6f09f9f9397bfb7bfd60a9323c9c2.zip
KVM: selftests: Rename and tweak get_cpuid() to get_cpuid_entry()
Rename get_cpuid() to get_cpuid_entry() to better reflect its behavior. Leave set_cpuid() as is to avoid unnecessary churn, that helper will soon be removed entirely. Oppurtunistically tweak the implementation to avoid using a temporary variable in anticipation of taggin the input @cpuid with "const". No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-21-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64/processor.h')
-rw-r--r--tools/testing/selftests/kvm/include/x86_64/processor.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index c61b3aa4950f..1703e07f8b83 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -766,8 +766,8 @@ void vm_set_page_table_entry(struct kvm_vm *vm, struct kvm_vcpu *vcpu,
/*
* get_cpuid() - find matching CPUID entry and return pointer to it.
*/
-struct kvm_cpuid_entry2 *get_cpuid(struct kvm_cpuid2 *cpuid, uint32_t function,
- uint32_t index);
+struct kvm_cpuid_entry2 *get_cpuid_entry(struct kvm_cpuid2 *cpuid,
+ uint32_t function, uint32_t index);
/*
* set_cpuid() - overwrites a matching cpuid entry with the provided value.
* matches based on ent->function && ent->index. returns true