selftests/powerpc: rfi_flush: disable entry flush if present
authorRussell Currey <ruscur@russell.cc>
Tue, 17 Nov 2020 05:59:11 +0000 (16:59 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 12:47:12 +0000 (23:47 +1100)
commitfcb48454c23c5679d1a2e252f127642e91b05cbe
treedce94d41fdb52ee4373e3017840f673957ed8c73
parent3cea11cd5e3b00d91caf0b4730194039b45c5891
selftests/powerpc: rfi_flush: disable entry flush if present

We are about to add an entry flush. The rfi (exit) flush test measures
the number of L1D flushes over a syscall with the RFI flush enabled and
disabled. But if the entry flush is also enabled, the effect of enabling
and disabling the RFI flush is masked.

If there is a debugfs entry for the entry flush, disable it during the RFI
flush and restore it later.

Reported-by: Spoorthy S <spoorts2@in.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/security/rfi_flush.c