<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/powerpc/include/utils.h, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc/include/utils.h?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/powerpc/include/utils.h?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-27T06:32:42Z</updated>
<entry>
<title>selftests/powerpc: Add matrix multiply assist (MMA) test</title>
<updated>2022-04-27T06:32:42Z</updated>
<author>
<name>Alistair Popple</name>
<email>alistair@popple.id.au</email>
</author>
<published>2020-06-22T02:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3527e1ab9a7990530dfb0137ddcfa64bed2915be'/>
<id>urn:sha1:3527e1ab9a7990530dfb0137ddcfa64bed2915be</id>
<content type='text'>
Adds a simple test of some basic matrix multiply assist (MMA)
instructions.

Signed-off-by: Alistair Popple &lt;alistair@popple.id.au&gt;
Tested-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200622021832.15870-1-alistair@popple.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: refactor entry and rfi_flush tests</title>
<updated>2020-11-19T12:47:23Z</updated>
<author>
<name>Daniel Axtens</name>
<email>dja@axtens.net</email>
</author>
<published>2020-11-17T05:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0d239f3b03efc78fb5b290aff6c747fecd3b98cb'/>
<id>urn:sha1:0d239f3b03efc78fb5b290aff6c747fecd3b98cb</id>
<content type='text'>
For simplicity in backporting, the original entry_flush test contained
a lot of duplicated code from the rfi_flush test. De-duplicate that code.

Signed-off-by: Daniel Axtens &lt;dja@axtens.net&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>selftests/powerpc: Include asm/cputable.h from utils.h</title>
<updated>2020-09-08T12:23:59Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-08-19T01:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=178282a054dced1a08a9683d41ac08cbace2b2fe'/>
<id>urn:sha1:178282a054dced1a08a9683d41ac08cbace2b2fe</id>
<content type='text'>
utils.h provides have_hwcap() and have_hwcap2() which check for a
feature bit. Those bits are defined in asm/cputable.h, so include it
in utils.h so users of utils.h don't have to do it manually.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200819015727.1977134-4-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: Move set_dscr() into rfi_flush.c</title>
<updated>2020-09-08T12:23:57Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-08-19T01:57:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d89002397cfb2b65267d6688fe671ee1cf7c5f0d'/>
<id>urn:sha1:d89002397cfb2b65267d6688fe671ee1cf7c5f0d</id>
<content type='text'>
This version of set_dscr() was added for the RFI flush test, and is
fairly specific to it. It also clashes with the version of set_dscr()
in dscr/dscr.h. So move it into the RFI flush test where it's used.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200819015727.1977134-3-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: Add wrapper for gettid</title>
<updated>2020-07-29T11:02:10Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-07-27T04:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=743f3544fffb9662aaf550c8358a8c1b6fcae707'/>
<id>urn:sha1:743f3544fffb9662aaf550c8358a8c1b6fcae707</id>
<content type='text'>
The gettid() syscall wrapper was first introduced in
glibc 2.30. This adds a wrapper for use in distros
running older versions.

Suggested-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Suggested-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/8ca3b0eeda989707815d1cf337cc33f090408965.1595821792.git.sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add helper to exit on failure</title>
<updated>2020-07-29T11:02:10Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-07-27T04:00:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e3333c599482245d08002725cc1b353e4963fa26'/>
<id>urn:sha1:e3333c599482245d08002725cc1b353e4963fa26</id>
<content type='text'>
This adds a helper similar to FAIL_IF() which lets a
program exit with code 1 (to indicate failure) when
the given condition is true.

Signed-off-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/dac282d5c2e96e7816dc522e4e20d56d7c79c898.1595821792.git.sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Move pkey helpers to headers</title>
<updated>2020-07-29T11:02:10Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-07-27T04:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=128d3d0210076232b7d54c361082c8ee17e4b669'/>
<id>urn:sha1:128d3d0210076232b7d54c361082c8ee17e4b669</id>
<content type='text'>
This moves all the pkey-related helpers to a new header
file and also a helper to print error messages in signal
handlers to the existing utils header file.

Signed-off-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/28e633fa9ec1a6500c12188e09ea1887b10a10c1.1595821792.git.sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Move Hash MMU check to utilities</title>
<updated>2020-06-30T04:37:51Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.ibm.com</email>
</author>
<published>2020-06-04T12:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c405b738daf9d8e8a5aedfeb6be851681e65e54b'/>
<id>urn:sha1:c405b738daf9d8e8a5aedfeb6be851681e65e54b</id>
<content type='text'>
This moves a function to test if the MMU is in Hash mode
under the generic test utilities.

Signed-off-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200604125610.649668-3-sandipan@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add prefixed loads/stores to alignment_handler test</title>
<updated>2020-06-22T04:18:45Z</updated>
<author>
<name>Jordan Niethe</name>
<email>jniethe5@gmail.com</email>
</author>
<published>2020-05-20T02:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=620a6473df36f8dc6f70bc85ff3465b2e21d1254'/>
<id>urn:sha1:620a6473df36f8dc6f70bc85ff3465b2e21d1254</id>
<content type='text'>
Extend the alignment handler selftest to exercise prefixed load store
instructions. Add tests for prefixed VSX, floating point and integer
instructions.

Skip prefix tests if ISA version does not support prefixed instructions.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
Tested-by: Alistair Popple &lt;alistair@popple.id.au&gt;
[mpe: Fixup PPC_FEATURE2_ARCH_3_1 naming as noted by Alistair]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200520021103.19798-2-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test of spectre_v2 mitigations</title>
<updated>2019-10-30T04:43:57Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2019-05-20T10:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c790c3d2b0ec5979d83451d0688d1cd07e23d8ba'/>
<id>urn:sha1:c790c3d2b0ec5979d83451d0688d1cd07e23d8ba</id>
<content type='text'>
This test uses the PMU to count branch prediction hits/misses for a
known loop, and compare the result to the reported spectre v2
mitigation.

This gives us a way of sanity checking that the reported mitigation is
actually in effect.

Sample output for some cases, eg:

  Power9:
    sysfs reports: 'Vulnerable'
     PM_BR_PRED_CCACHE: result        368 running/enabled 5792777124
    PM_BR_MPRED_CCACHE: result        319 running/enabled 5792775546
     PM_BR_PRED_PCACHE: result 2147483281 running/enabled 5792773128
    PM_BR_MPRED_PCACHE: result  213604201 running/enabled 5792771640
    Miss percent 9 %
    OK - Measured branch prediction rates match reported spectre v2 mitigation.

    sysfs reports: 'Mitigation: Indirect branch serialisation (kernel only)'
     PM_BR_PRED_CCACHE: result        895 running/enabled 5780320920
    PM_BR_MPRED_CCACHE: result        822 running/enabled 5780312414
     PM_BR_PRED_PCACHE: result 2147482754 running/enabled 5780308836
    PM_BR_MPRED_PCACHE: result  213639731 running/enabled 5780307912
    Miss percent 9 %
    OK - Measured branch prediction rates match reported spectre v2 mitigation.

    sysfs reports: 'Mitigation: Indirect branch cache disabled'
     PM_BR_PRED_CCACHE: result 2147483649 running/enabled 20540186160
    PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 20540180056
     PM_BR_PRED_PCACHE: result          0 running/enabled 20540176090
    PM_BR_MPRED_PCACHE: result          0 running/enabled 20540174182
    Miss percent 100 %
    OK - Measured branch prediction rates match reported spectre v2 mitigation.

  Power8:
    sysfs reports: 'Vulnerable'
     PM_BR_PRED_CCACHE: result 2147483649 running/enabled 3505888142
    PM_BR_MPRED_CCACHE: result          9 running/enabled 3505882788
    Miss percent 0 %
    OK - Measured branch prediction rates match reported spectre v2 mitigation.

    sysfs reports: 'Mitigation: Indirect branch cache disabled'
     PM_BR_PRED_CCACHE: result 2147483649 running/enabled 16931421988
    PM_BR_MPRED_CCACHE: result 2147483649 running/enabled 16931416478
    Miss percent 100 %
    OK - Measured branch prediction rates match reported spectre v2 mitigation.
    success: spectre_v2

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20190520105520.22274-1-mpe@ellerman.id.au
</content>
</entry>
</feed>
