Message ID | 20220208122148.912913-2-mlevitsk@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | My set of KVM unit tests + fixes | expand |
diff --git a/x86/pmu_lbr.c b/x86/pmu_lbr.c index 5ff805a..688634d 100644 --- a/x86/pmu_lbr.c +++ b/x86/pmu_lbr.c @@ -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; diff --git a/x86/unittests.cfg b/x86/unittests.cfg index 9a70ba3..89ff949 100644 --- a/x86/unittests.cfg +++ b/x86/unittests.cfg @@ -179,6 +179,7 @@ check = /proc/sys/kernel/nmi_watchdog=0 accel = kvm [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 | 6 ++++++ x86/unittests.cfg | 1 + 2 files changed, 7 insertions(+)