]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390: Add Dat-Enhancement facility 1 to architecture level set
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 3 Nov 2025 13:39:26 +0000 (14:39 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 6 Nov 2025 13:12:30 +0000 (14:12 +0100)
Add the Dat-Enhancement facility 1 to the list of facilities which are
required to start the kernel. The facility provides the CSPG and IDTE
instructions. In particular the CSPG instruction can be used to replace a
valid page table entry with a different page table entry, which also
differs in the page frame real address.

Without the CSPG instruction it is possible to use the CSP instruction to
change valid page table entries, however it only allows to change the lower
or higher 32 bits of such entries, which means it cannot be used to change
the page frame real address of valid page table entries.

Given that there is code around (e.g. HugeTLB vmemmap optimization) which
requires to change valid page table entries of the kernel mapping, without
the detour over an invalid page table entry, make the CSPG instruction
unconditionally available.

The Dat-Enhancement facility 1 is available since z990, which is older than
the currently supported minimum architecture (z10). Therefore adding this
to the architecture level set shouldn't cause any problems.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/tools/gen_facilities.c

index d5c68ade71ab79a9ea8fb49cae825dd1f68ab30c..2d28a569f79310a4940c44025c97b085f8b4eec8 100644 (file)
@@ -29,6 +29,7 @@ static struct facility_def facility_defs[] = {
                .bits = (int[]){
                        0,  /* N3 instructions */
                        1,  /* z/Arch mode installed */
+                       3,  /* dat-enhancement 1 */
                        18, /* long displacement facility */
                        21, /* extended-immediate facility */
                        25, /* store clock fast */