Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <mingo@kernel.org>
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: x86-cpuid@lists.linux.dev
Link: https://lore.kernel.org/r/aCZOi0Oohc7DpgTo@lx-t490

authored by

Ahmed S. Darwish and committed by
Ingo Molnar
3bf8ce82 119deb95

+8 -8
+1 -1
arch/x86/include/asm/acrn.h
··· 25 25 static inline u32 acrn_cpuid_base(void) 26 26 { 27 27 if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) 28 - return hypervisor_cpuid_base("ACRNACRNACRN", 0); 28 + return cpuid_base_hypervisor("ACRNACRNACRN", 0); 29 29 30 30 return 0; 31 31 }
+3 -3
arch/x86/include/asm/cpuid/api.h
··· 188 188 return false; 189 189 } 190 190 191 - #define for_each_possible_hypervisor_cpuid_base(function) \ 191 + #define for_each_possible_cpuid_base_hypervisor(function) \ 192 192 for (function = 0x40000000; function < 0x40010000; function += 0x100) 193 193 194 - static inline u32 hypervisor_cpuid_base(const char *sig, u32 leaves) 194 + static inline u32 cpuid_base_hypervisor(const char *sig, u32 leaves) 195 195 { 196 196 u32 base, eax, signature[3]; 197 197 198 - for_each_possible_hypervisor_cpuid_base(base) { 198 + for_each_possible_cpuid_base_hypervisor(base) { 199 199 cpuid(base, &eax, &signature[0], &signature[1], &signature[2]); 200 200 201 201 /*
+1 -1
arch/x86/include/asm/xen/hypervisor.h
··· 43 43 44 44 static inline uint32_t xen_cpuid_base(void) 45 45 { 46 - return hypervisor_cpuid_base(XEN_SIGNATURE, 2); 46 + return cpuid_base_hypervisor(XEN_SIGNATURE, 2); 47 47 } 48 48 49 49 struct pci_dev;
+1 -1
arch/x86/kernel/jailhouse.c
··· 49 49 !boot_cpu_has(X86_FEATURE_HYPERVISOR)) 50 50 return 0; 51 51 52 - return hypervisor_cpuid_base("Jailhouse\0\0\0", 0); 52 + return cpuid_base_hypervisor("Jailhouse\0\0\0", 0); 53 53 } 54 54 55 55 static uint32_t __init jailhouse_detect(void)
+1 -1
arch/x86/kernel/kvm.c
··· 875 875 return 0; /* So we don't blow up on old processors */ 876 876 877 877 if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) 878 - return hypervisor_cpuid_base(KVM_SIGNATURE, 0); 878 + return cpuid_base_hypervisor(KVM_SIGNATURE, 0); 879 879 880 880 return 0; 881 881 }
+1 -1
arch/x86/kvm/cpuid.c
··· 236 236 struct kvm_cpuid_entry2 *entry; 237 237 u32 base; 238 238 239 - for_each_possible_hypervisor_cpuid_base(base) { 239 + for_each_possible_cpuid_base_hypervisor(base) { 240 240 entry = kvm_find_cpuid_entry(vcpu, base); 241 241 242 242 if (entry) {