/* Mask kvm_cpu_caps for @leaf with the raw CPUID capabilities of this CPU. */
static __always_inline void __kvm_cpu_cap_mask(unsigned int leaf)
{
const struct cpuid_reg cpuid = x86_feature_cpuid(leaf * 32);
- struct kvm_cpuid_entry2 entry;
reverse_cpuid_check(leaf);
- cpuid_count(cpuid.function, cpuid.index,
- &entry.eax, &entry.ebx, &entry.ecx, &entry.edx);
-
- kvm_cpu_caps[leaf] &= *__cpuid_entry_get_reg(&entry, cpuid.reg);
+ kvm_cpu_caps[leaf] &= raw_cpuid_get(cpuid);
}
static __always_inline