aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/security/spectre_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/powerpc/security/spectre_v2.c')
-rw-r--r--tools/testing/selftests/powerpc/security/spectre_v2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c
index c8d82b784102..adc2b7294e5f 100644
--- a/tools/testing/selftests/powerpc/security/spectre_v2.c
+++ b/tools/testing/selftests/powerpc/security/spectre_v2.c
@@ -134,6 +134,9 @@ int spectre_v2_test(void)
s64 miss_percent;
bool is_p9;
+ // The PMU events we use only work on Power8 or later
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
+
state = get_sysfs_state();
if (state == UNKNOWN) {
printf("Error: couldn't determine spectre_v2 mitigation state?\n");