acrn-kernel/arch/s390/mm
Heiko Carstens 20412ca356 s390/cmma: fix detection of DAT pages
commit 44d93045247661acbd50b1629e62f415f2747577 upstream.

If the cmma no-dat feature is available the kernel page tables are walked
to identify and mark all pages which are used for address translation (all
region, segment, and page tables). In a subsequent loop all other pages are
marked as "no-dat" pages with the ESSA instruction.

This information is visible to the hypervisor, so that the hypervisor can
optimize purging of guest TLB entries. The initial loop however is
incorrect: only the first three of the four pages which belong to segment
and region tables will be marked as being used for DAT. The last page is
incorrectly marked as no-dat.

This can result in incorrect guest TLB flushes.

Fix this by simply marking all four pages.

Cc: <stable@vger.kernel.org>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:07:14 +00:00
..
Makefile
cmm.c
dump_pagetables.c
extable.c
extmem.c s390/extmem: return correct segment type in __segment_load() 2023-03-10 09:34:04 +01:00
fault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
gmap.c KVM: s390: pv: fix index value of replaced ASCE 2023-08-03 10:23:48 +02:00
hugetlbpage.c
init.c
kasan_init.c
maccess.c
mmap.c
page-states.c s390/cmma: fix detection of DAT pages 2023-11-28 17:07:14 +00:00
pageattr.c
pgalloc.c
pgtable.c
vmem.c