Skip to content

Commit 8b30cb3

Browse files
committed
KVM: x86: Move kvm_find_cpuid_entry{,_index}() up near cpuid_entry2_find()
Move kvm_find_cpuid_entry{,_index}() "up" in cpuid.c so that they are colocated with cpuid_entry2_find(), e.g. to make it easier to see the effective guts of the helpers without having to bounce around cpuid.c. No functional change intended. Reviewed-by: Maxim Levitsky <[email protected]> Reviewed-by: Binbin Wu <[email protected]> Reviewed-by: Xiaoyao Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 285185f commit 8b30cb3

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,20 @@ static struct kvm_cpuid_entry2 *cpuid_entry2_find(struct kvm_vcpu *vcpu,
142142
return NULL;
143143
}
144144

145+
struct kvm_cpuid_entry2 *kvm_find_cpuid_entry_index(struct kvm_vcpu *vcpu,
146+
u32 function, u32 index)
147+
{
148+
return cpuid_entry2_find(vcpu, function, index);
149+
}
150+
EXPORT_SYMBOL_GPL(kvm_find_cpuid_entry_index);
151+
152+
struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu,
153+
u32 function)
154+
{
155+
return cpuid_entry2_find(vcpu, function, KVM_CPUID_INDEX_NOT_SIGNIFICANT);
156+
}
157+
EXPORT_SYMBOL_GPL(kvm_find_cpuid_entry);
158+
145159
static int kvm_check_cpuid(struct kvm_vcpu *vcpu)
146160
{
147161
struct kvm_cpuid_entry2 *best;
@@ -1756,20 +1770,6 @@ int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
17561770
return r;
17571771
}
17581772

1759-
struct kvm_cpuid_entry2 *kvm_find_cpuid_entry_index(struct kvm_vcpu *vcpu,
1760-
u32 function, u32 index)
1761-
{
1762-
return cpuid_entry2_find(vcpu, function, index);
1763-
}
1764-
EXPORT_SYMBOL_GPL(kvm_find_cpuid_entry_index);
1765-
1766-
struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu,
1767-
u32 function)
1768-
{
1769-
return cpuid_entry2_find(vcpu, function, KVM_CPUID_INDEX_NOT_SIGNIFICANT);
1770-
}
1771-
EXPORT_SYMBOL_GPL(kvm_find_cpuid_entry);
1772-
17731773
/*
17741774
* Intel CPUID semantics treats any query for an out-of-range leaf as if the
17751775
* highest basic leaf (i.e. CPUID.0H:EAX) were requested. AMD CPUID semantics

0 commit comments

Comments
 (0)