cpuid_count(cpuid.function, cpuid.index,
&entry.eax, &entry.ebx, &entry.ecx, &entry.edx);
- kvm_cpu_caps[leaf] &= *__cpuid_entry_get_reg(&entry, &cpuid);
+ kvm_cpu_caps[leaf] &= *__cpuid_entry_get_reg(&entry, cpuid.reg);
}
void kvm_set_cpu_caps(void)
}
static __always_inline u32 *__cpuid_entry_get_reg(struct kvm_cpuid_entry2 *entry,
- const struct cpuid_reg *cpuid)
+ u32 reg)
{
- switch (cpuid->reg) {
+ switch (reg) {
case CPUID_EAX:
return &entry->eax;
case CPUID_EBX:
{
const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature);
- return __cpuid_entry_get_reg(entry, &cpuid);
+ return __cpuid_entry_get_reg(entry, cpuid.reg);
}
static __always_inline u32 cpuid_entry_get(struct kvm_cpuid_entry2 *entry,
if (!entry)
return NULL;
- return __cpuid_entry_get_reg(entry, &cpuid);
+ return __cpuid_entry_get_reg(entry, cpuid.reg);
}
static __always_inline bool guest_cpuid_has(struct kvm_vcpu *vcpu,