this_cpu_has
if (this_cpu_has(X86_FEATURE_ARCH_PERFMON_EXT))
if (this_cpu_has(X86_FEATURE_ARAT)) {
if (this_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER)) {
if (!this_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
if (this_cpu_has(X86_FEATURE_SME_COHERENT) || npages == 0 ||
if (!this_cpu_has(X86_FEATURE_OSVW) ||
if (!this_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL)) {
if (!this_cpu_has(X86_FEATURE_VMX)) {
!this_cpu_has(X86_FEATURE_ACPI)) {
!this_cpu_has(X86_FEATURE_ACPI)) {
if (this_cpu_has(X86_FEATURE_PLN) && int_pln_enable)
if (this_cpu_has(X86_FEATURE_PTS)) {
if (this_cpu_has(X86_FEATURE_PLN) && int_pln_enable)
if (this_cpu_has(X86_FEATURE_HFI))
if (this_cpu_has(X86_FEATURE_HYPERVISOR)) {
return nr_bits > feature.f.bit && !this_cpu_has(feature.f);
return nr_bits > feature.f.bit || this_cpu_has(feature.f);
if (this_cpu_has(X86_FEATURE_VMX))
GUEST_ASSERT(this_cpu_has(X86_FEATURE_XSAVE) &&
this_cpu_has(X86_FEATURE_OSXSAVE));
else if (this_cpu_has(X86_FEATURE_VMX))
if (this_cpu_has(X86_FEATURE_SVM))
GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSXSAVE));
GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSXSAVE));
if (!this_cpu_has(HV_ACCESS_TSC_INVARIANT))
GUEST_ASSERT(this_cpu_has(X86_FEATURE_INVTSC));
GUEST_ASSERT(this_cpu_has(X86_FEATURE_INVTSC) ==
if (this_cpu_has(X86_FEATURE_SVM))
else if (this_cpu_has(X86_FEATURE_VMX))
__GUEST_ASSERT(this_cpu_has(X86_FEATURE_MWAIT) == !(testcase & MWAIT_DISABLED),
TEST_REQUIRE(this_cpu_has(X86_FEATURE_MWAIT));
if (this_cpu_has(msr->feature2)) {
if ((!this_cpu_has(msr->feature) && !this_cpu_has(msr->feature2)) ||
if (this_cpu_has(msr->feature))
if (this_cpu_has(X86_FEATURE_VMX))
if (this_cpu_has(X86_FEATURE_VMX))
int f = this_cpu_has(X86_FEATURE_SVM) ? SVM_F : VMX_F;
if (this_cpu_has(X86_FEATURE_SVM))
if (this_cpu_has(X86_FEATURE_VMX))
if (this_cpu_has(X86_FEATURE_VMX))
if (this_cpu_has(X86_FEATURE_VMX)) {
if (this_cpu_has(X86_FEATURE_VMX))
if (!this_cpu_has(X86_FEATURE_CLFLUSHOPT) &&
!this_cpu_has(X86_FEATURE_CLFLUSH))
if (this_cpu_has(X86_FEATURE_CLFLUSHOPT)) \
else if (this_cpu_has(X86_FEATURE_CLFLUSH)) \
if (this_cpu_has(X86_FEATURE_PDCM) &&
if (this_cpu_has(X86_FEATURE_PDCM) &&
GUEST_ASSERT(this_cpu_has(X86_FEATURE_SEV));
if (this_cpu_has(X86_FEATURE_SVM)) {
if (this_cpu_has(X86_FEATURE_SVM)) {
if (this_cpu_has(X86_FEATURE_XSAVE)) {
if (this_cpu_has(X86_FEATURE_MPX)) {
if (this_cpu_has(X86_FEATURE_PKU)) {
GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSPKE));
if (this_cpu_has(X86_FEATURE_SVM))
if (this_cpu_has(X86_FEATURE_IDLE_HLT))