]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: EBB selftest for MMCR0 control for PMU SPRs in ISA v3.1
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Tue, 25 May 2021 13:51:43 +0000 (09:51 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Jun 2021 14:09:11 +0000 (00:09 +1000)
commitb175ed07a63a810246939318f8d8c36e8f1d4e77
tree8119f2165e397588cb71d9ee6de697b3f79febb2
parent044975413191911e190ab04a4c49530b2e95231d
selftests/powerpc: EBB selftest for MMCR0 control for PMU SPRs in ISA v3.1

With the MMCR0 control bit (PMCCEXT) in ISA v3.1, read access to
group B registers is restricted when MMCR0 PMCC=0b00. In other
platforms (like power9), the older behaviour works where group B
PMU SPRs are readable.

Patch creates a selftest which verifies that the test takes a
SIGILL when attempting to read PMU registers via helper function
"dump_ebb_state" for ISA v3.1.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com <mailto:rnsastry@linux.ibm.com>>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1621950703-1532-3-git-send-email-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/ebb/Makefile
tools/testing/selftests/powerpc/pmu/ebb/regs_access_pmccext_test.c [new file with mode: 0644]