On KVM guests running on some AMD systems, the IBRS feature is reported
as a synthetic feature using the Intel feature, while the cpuinfo entry
keeps the same. Handle that by first checking the presence of the Intel
feature on AMD systems.
Fixes bug 28704.
else if (cpu_features->basic.kind == arch_kind_amd)
{
fails += CHECK_PROC (ibpb, AMD_IBPB);
- fails += CHECK_PROC (ibrs, AMD_IBRS);
+
+ /* The IBRS feature on AMD processors is reported using the Intel feature
+ * on KVM guests (synthetic bit). In both cases the cpuinfo entry is the
+ * same. */
+ if (HAS_CPU_FEATURE (IBRS_IBPB))
+ fails += CHECK_PROC (ibrs, IBRS_IBPB);
+ else
+ fails += CHECK_PROC (ibrs, AMD_IBRS);
fails += CHECK_PROC (stibp, AMD_STIBP);
}
fails += CHECK_PROC (ibt, IBT);