Skip to content

Commit 3bf8ce8

Browse files
Ahmed S. DarwishIngo Molnar
authored andcommitted
x86/cpuid: Rename hypervisor_cpuid_base()/for_each_possible_hypervisor_cpuid_base() to cpuid_base_hypervisor()/for_each_possible_cpuid_base_hypervisor()
In order to let all the APIs under <cpuid/api.h> have a shared "cpuid_" namespace, rename hypervisor_cpuid_base() to cpuid_base_hypervisor(). To align with the new style, also rename: for_each_possible_hypervisor_cpuid_base(function) to: for_each_possible_cpuid_base_hypervisor(function) Adjust call-sites accordingly. Suggested-by: Ingo Molnar <[email protected]> Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Woodhouse <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: John Ogness <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Vitaly Kuznetsov <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/aCZOi0Oohc7DpgTo@lx-t490
1 parent 119deb9 commit 3bf8ce8

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

arch/x86/include/asm/acrn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void acrn_remove_intr_handler(void);
2525
static inline u32 acrn_cpuid_base(void)
2626
{
2727
if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
28-
return hypervisor_cpuid_base("ACRNACRNACRN", 0);
28+
return cpuid_base_hypervisor("ACRNACRNACRN", 0);
2929

3030
return 0;
3131
}

arch/x86/include/asm/cpuid/api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ static __always_inline bool cpuid_function_is_indexed(u32 function)
188188
return false;
189189
}
190190

191-
#define for_each_possible_hypervisor_cpuid_base(function) \
191+
#define for_each_possible_cpuid_base_hypervisor(function) \
192192
for (function = 0x40000000; function < 0x40010000; function += 0x100)
193193

194-
static inline u32 hypervisor_cpuid_base(const char *sig, u32 leaves)
194+
static inline u32 cpuid_base_hypervisor(const char *sig, u32 leaves)
195195
{
196196
u32 base, eax, signature[3];
197197

198-
for_each_possible_hypervisor_cpuid_base(base) {
198+
for_each_possible_cpuid_base_hypervisor(base) {
199199
cpuid(base, &eax, &signature[0], &signature[1], &signature[2]);
200200

201201
/*

arch/x86/include/asm/xen/hypervisor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern struct start_info *xen_start_info;
4343

4444
static inline uint32_t xen_cpuid_base(void)
4545
{
46-
return hypervisor_cpuid_base(XEN_SIGNATURE, 2);
46+
return cpuid_base_hypervisor(XEN_SIGNATURE, 2);
4747
}
4848

4949
struct pci_dev;

arch/x86/kernel/jailhouse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static uint32_t jailhouse_cpuid_base(void)
4949
!boot_cpu_has(X86_FEATURE_HYPERVISOR))
5050
return 0;
5151

52-
return hypervisor_cpuid_base("Jailhouse\0\0\0", 0);
52+
return cpuid_base_hypervisor("Jailhouse\0\0\0", 0);
5353
}
5454

5555
static uint32_t __init jailhouse_detect(void)

arch/x86/kernel/kvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ static noinline uint32_t __kvm_cpuid_base(void)
875875
return 0; /* So we don't blow up on old processors */
876876

877877
if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
878-
return hypervisor_cpuid_base(KVM_SIGNATURE, 0);
878+
return cpuid_base_hypervisor(KVM_SIGNATURE, 0);
879879

880880
return 0;
881881
}

arch/x86/kvm/cpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static struct kvm_hypervisor_cpuid kvm_get_hypervisor_cpuid(struct kvm_vcpu *vcp
236236
struct kvm_cpuid_entry2 *entry;
237237
u32 base;
238238

239-
for_each_possible_hypervisor_cpuid_base(base) {
239+
for_each_possible_cpuid_base_hypervisor(base) {
240240
entry = kvm_find_cpuid_entry(vcpu, base);
241241

242242
if (entry) {

0 commit comments

Comments
 (0)