@@ -68,6 +68,12 @@ int main(int ac, char **av)
int max, i;
setup_vm();
+
+ if (!is_intel()) {
+ report_skip("PMU_LBR test is for intel CPU's only");
+ return 0;
+ }
+
perf_cap = rdmsr(MSR_IA32_PERF_CAPABILITIES);
eax.full = id.a;
@@ -83,6 +89,8 @@ int main(int ac, char **av)
printf("PMU version: %d\n", eax.split.version_id);
printf("LBR version: %ld\n", perf_cap & PMU_CAP_LBR_FMT);
+
+
/* Look for LBR from and to MSRs */
lbr_from = MSR_LBR_CORE_FROM;
lbr_to = MSR_LBR_CORE_TO;
@@ -180,6 +180,7 @@ extra_params = -cpu max
check = /proc/sys/kernel/nmi_watchdog=0
[pmu_lbr]
+arch = x86_64
file = pmu_lbr.flat
extra_params = -cpu host,migratable=no
check = /sys/module/kvm/parameters/ignore_msrs=N
* don't run this test on AMD since AMD's LBR is not the same as Intel's LBR and needs a different test. * don't run this test on 32 bit as it is not built for 32 bit anyway Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> --- x86/pmu_lbr.c | 8 ++++++++ x86/unittests.cfg | 1 + 2 files changed, 9 insertions(+)