linux/tools/testing/selftests/powerpc
Naveen N. Rao d2bf793237 selftests/powerpc: Add test to verify rfi flush across a system call
This adds a test to verify proper functioning of the rfi flush
capability implemented to mitigate meltdown. The test works by
measuring the number of L1d cache misses encountered while loading
data from memory. Across a system call, since the L1d cache is flushed
when rfi_flush is enabled, the number of cache misses is expected to
be relative to the number of cachelines corresponding to the data
being loaded.

The current system setting is reflected via powerpc/rfi_flush under
debugfs (assumed to be /sys/kernel/debug/). This test verifies the
expected result with rfi_flush enabled as well as when it is disabled.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
[mpe: Add SPDX tags, clang format, skip if the debugfs is missing, use
 __u64 and SANE_USERSPACE_TYPES to avoid printf() build errors.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-20 13:26:47 +11:00
..
alignment selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
benchmarks selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
cache_shape selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
copyloops selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
dscr selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
include selftests/powerpc: Add test to verify rfi flush across a system call 2018-10-20 13:26:47 +11:00
lib selftests/powerpc: Add ptrace tests for VSX, VMX registers 2016-11-17 17:11:51 +11:00
math selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
mm selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
pmu selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
primitives selftests/powerpc: Move UCONTEXT_NIA() into utils.h 2018-10-20 13:26:47 +11:00
ptrace Merge branch 'fixes' into next 2018-10-09 16:51:05 +11:00
scripts selftests/powerpc: Add script to test HMI functionality 2015-12-17 10:46:43 +11:00
security selftests/powerpc: Add test to verify rfi flush across a system call 2018-10-20 13:26:47 +11:00
signal selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
stringloops selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
switch_endian selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
syscalls selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
tm Merge branch 'fixes' into next 2018-10-09 16:51:05 +11:00
vphn selftests/powerpc: Fix Makefiles for headers_install change 2018-09-28 15:07:45 +10:00
harness.c selftests/powerpc: Kill child processes on SIGINT 2018-08-08 18:52:24 +10:00
Makefile selftests/powerpc: Add test to verify rfi flush across a system call 2018-10-20 13:26:47 +11:00
utils.c selftests/powerpc: Add test to verify rfi flush across a system call 2018-10-20 13:26:47 +11:00