<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/vm/va_128TBswitch.sh, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-07-26T23:59:50Z</updated>
<entry>
<title>selftests/vm: fix va_128TBswitch.sh permissions</title>
<updated>2022-07-26T23:59:50Z</updated>
<author>
<name>Adam Sindelar</name>
<email>adam@wowsignal.io</email>
</author>
<published>2022-07-08T09:06:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=187e7c41445a0f202bb551f08ca7f8158fea1cd7'/>
<id>urn:sha1:187e7c41445a0f202bb551f08ca7f8158fea1cd7</id>
<content type='text'>
Restore the +x bit to va_128TBswitch.sh, which got dropped from the
previous patch, somehow.

Link: https://lkml.kernel.org/r/20220708090646.34927-1-adam@wowsignal.io
Fixes: 1afd01d43efc3 ("selftests/vm: Only run 128TBswitch with 5-level paging")

Signed-off-by: Adam Sindelar &lt;adam@wowsignal.io&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/vm: only run 128TBswitch with 5-level paging</title>
<updated>2022-07-04T01:08:52Z</updated>
<author>
<name>Adam Sindelar</name>
<email>adam@wowsignal.io</email>
</author>
<published>2022-06-27T16:39:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4f2930c6718afbb6c5904cda6f6781a70c52a042'/>
<id>urn:sha1:4f2930c6718afbb6c5904cda6f6781a70c52a042</id>
<content type='text'>
The test va_128TBswitch.c expects to be able to pass mmap an address hint
and length that cross the address 1&lt;&lt;47.  On x86_64, this is not possible
without 5-level page tables, so the test fails.

The test is already only run on 64-bit powerpc and x86_64 archs, but this
patch adds an additional check on x86_64 that skips the test if
PG_TABLE_LEVELS &lt; 5.  There is precedent for checking /proc/config.gz in
selftests, e.g.  in selftests/firmware.

Running the tests produces the desired output:

sudo make -C tools/testing/selftests TARGETS=vm run_tests
---------------------------
running ./va_128TBswitch.sh
---------------------------
./va_128TBswitch.sh: PG_TABLE_LEVELS=4, must be &gt;= 5 to run this test
[SKIP]
-------------------------------

[adam@wowsignal.io: restrict the check to x86_64]
  Link: https://lkml.kernel.org/r/20220628163654.337600-1-adam@wowsignal.io
[adam@wowsignal.io: fix formatting issues, rename "die" to "fail"]
  Link: https://lkml.kernel.org/r/20220701163030.415735-1-adam@wowsignal.io
Link: https://lkml.kernel.org/r/20220627163912.5581-1-adam@wowsignal.io
Signed-off-by: Adam Sindelar &lt;adam@wowsignal.io&gt;
Cc: Adam Sindelar &lt;ats@fb.com&gt;
Cc: David Vernet &lt;void@manifault.com&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
