Lines Matching refs:x86_feature

93 static __always_inline u32 __feature_bit(int x86_feature)
95 reverse_cpuid_check(x86_feature / 32);
96 return 1 << (x86_feature & 31);
101 static __always_inline struct cpuid_reg x86_feature_cpuid(unsigned int x86_feature)
103 unsigned int x86_leaf = x86_feature / 32;
128 unsigned int x86_feature)
130 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature);
136 unsigned int x86_feature)
138 u32 *reg = cpuid_entry_get_reg(entry, x86_feature);
140 return *reg & __feature_bit(x86_feature);
144 unsigned int x86_feature)
146 return cpuid_entry_get(entry, x86_feature);
150 unsigned int x86_feature)
152 u32 *reg = cpuid_entry_get_reg(entry, x86_feature);
154 *reg &= ~__feature_bit(x86_feature);
158 unsigned int x86_feature)
160 u32 *reg = cpuid_entry_get_reg(entry, x86_feature);
162 *reg |= __feature_bit(x86_feature);
166 unsigned int x86_feature,
169 u32 *reg = cpuid_entry_get_reg(entry, x86_feature);
176 *reg |= __feature_bit(x86_feature);
178 *reg &= ~__feature_bit(x86_feature);
191 unsigned int x86_feature)
193 const struct cpuid_reg cpuid = x86_feature_cpuid(x86_feature);
204 unsigned int x86_feature)
208 reg = guest_cpuid_get_register(vcpu, x86_feature);
212 return *reg & __feature_bit(x86_feature);
216 unsigned int x86_feature)
220 reg = guest_cpuid_get_register(vcpu, x86_feature);
222 *reg &= ~__feature_bit(x86_feature);
293 static __always_inline void kvm_cpu_cap_clear(unsigned int x86_feature)
295 unsigned int x86_leaf = x86_feature / 32;
298 kvm_cpu_caps[x86_leaf] &= ~__feature_bit(x86_feature);
301 static __always_inline void kvm_cpu_cap_set(unsigned int x86_feature)
303 unsigned int x86_leaf = x86_feature / 32;
306 kvm_cpu_caps[x86_leaf] |= __feature_bit(x86_feature);
309 static __always_inline u32 kvm_cpu_cap_get(unsigned int x86_feature)
311 unsigned int x86_leaf = x86_feature / 32;
314 return kvm_cpu_caps[x86_leaf] & __feature_bit(x86_feature);
317 static __always_inline bool kvm_cpu_cap_has(unsigned int x86_feature)
319 return !!kvm_cpu_cap_get(x86_feature);
322 static __always_inline void kvm_cpu_cap_check_and_set(unsigned int x86_feature)
324 if (boot_cpu_has(x86_feature))
325 kvm_cpu_cap_set(x86_feature);