#ifndef ARCH_X86_KVM_REVERSE_CPUID_H
#define ARCH_X86_KVM_REVERSE_CPUID_H
#include <uapi/asm/kvm.h>
#include <asm/cpufeature.h>
#include <asm/cpufeatures.h>
enum kvm_only_cpuid_leafs { … };
#define KVM_X86_FEATURE(w, f) …
#define KVM_X86_FEATURE_SGX1 …
#define KVM_X86_FEATURE_SGX2 …
#define KVM_X86_FEATURE_SGX_EDECCSSA …
#define X86_FEATURE_AVX_VNNI_INT8 …
#define X86_FEATURE_AVX_NE_CONVERT …
#define X86_FEATURE_AMX_COMPLEX …
#define X86_FEATURE_PREFETCHITI …
#define X86_FEATURE_AVX10 …
#define X86_FEATURE_INTEL_PSFD …
#define X86_FEATURE_IPRED_CTRL …
#define KVM_X86_FEATURE_RRSBA_CTRL …
#define X86_FEATURE_DDPD_U …
#define KVM_X86_FEATURE_BHI_CTRL …
#define X86_FEATURE_MCDT_NO …
#define X86_FEATURE_AVX10_128 …
#define X86_FEATURE_AVX10_256 …
#define X86_FEATURE_AVX10_512 …
#define KVM_X86_FEATURE_CONSTANT_TSC …
#define KVM_X86_FEATURE_PERFMON_V2 …
struct cpuid_reg { … };
static const struct cpuid_reg reverse_cpuid[] = …;
static __always_inline void reverse_cpuid_check(unsigned int x86_leaf)
{ … }
static __always_inline u32 __feature_translate(int x86_feature)
{ … }
static __always_inline u32 __feature_leaf(int x86_feature)
{ … }
static __always_inline u32 __feature_bit(int x86_feature)
{ … }
#define feature_bit(name) …
static __always_inline struct cpuid_reg x86_feature_cpuid(unsigned int x86_feature)
{ … }
static __always_inline u32 *__cpuid_entry_get_reg(struct kvm_cpuid_entry2 *entry,
u32 reg)
{ … }
static __always_inline u32 *cpuid_entry_get_reg(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature)
{ … }
static __always_inline u32 cpuid_entry_get(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature)
{ … }
static __always_inline bool cpuid_entry_has(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature)
{ … }
static __always_inline void cpuid_entry_clear(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature)
{ … }
static __always_inline void cpuid_entry_set(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature)
{ … }
static __always_inline void cpuid_entry_change(struct kvm_cpuid_entry2 *entry,
unsigned int x86_feature,
bool set)
{ … }
#endif