Skip to content
Snippets Groups Projects
Commit a61f03da authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Yang Yingliang
Browse files

KVM: cpuid: rename do_cpuid_1_ent

mainline inclusion
from mainline-v5.3-rc1
commit 50a9e1a4
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I3YAEG


CVE: NA

-----------------------------

do_cpuid_1_ent does not do the entire processing for a CPUID entry, it
only retrieves the host's values.  Rename it to match reality.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarJingyi Wang <wangjingyi11@huawei.com>
Reviewed-by: default avatarKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent ad2a90fb
No related branches found
No related tags found
No related merge requests found
......@@ -282,7 +282,7 @@ static void cpuid_mask(u32 *word, int wordnum)
*word &= boot_cpu_data.x86_capability[wordnum];
}
static void do_cpuid_1_ent(struct kvm_cpuid_entry2 *entry, u32 function,
static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
u32 index)
{
entry->function = function;
......@@ -482,7 +482,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
if (WARN_ON(*nent >= maxnent))
goto out;
do_cpuid_1_ent(entry, function, 0);
do_host_cpuid(entry, function, 0);
++*nent;
switch (function) {
......@@ -510,7 +510,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
if (*nent >= maxnent)
goto out;
do_cpuid_1_ent(&entry[t], function, 0);
do_host_cpuid(&entry[t], function, 0);
++*nent;
}
break;
......@@ -527,7 +527,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
cache_type = entry[i - 1].eax & 0x1f;
if (!cache_type)
break;
do_cpuid_1_ent(&entry[i], function, i);
do_host_cpuid(&entry[i], function, i);
++*nent;
}
break;
......@@ -550,7 +550,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
goto out;
++i;
do_cpuid_1_ent(&entry[i], function, i);
do_host_cpuid(&entry[i], function, i);
++*nent;
}
break;
......@@ -598,7 +598,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
level_type = entry[i - 1].ecx & 0xff00;
if (!level_type)
break;
do_cpuid_1_ent(&entry[i], function, i);
do_host_cpuid(&entry[i], function, i);
++*nent;
}
break;
......@@ -619,7 +619,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
if (*nent >= maxnent)
goto out;
do_cpuid_1_ent(&entry[i], function, idx);
do_host_cpuid(&entry[i], function, idx);
if (idx == 1) {
entry[i].eax &= kvm_cpuid_D_1_eax_x86_features;
cpuid_mask(&entry[i].eax, CPUID_D_1_EAX);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment