linux/arch/s390/mm
Heiko Carstens 7453e81061 s390/cmma: fix detection of DAT pages
commit 44d9304524 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>
History 2023-11-28 17:20:05 +00:00
..
cmm.c s390/mm: make virt_to_pfn() a static inline 2023-08-16 15:13:03 +02:00
dump_pagetables.c s390/amode31: change type of __samode31, __eamode31, etc 2023-08-30 11:03:27 +02:00
extable.c s390/extable: add EX_TABLE_UA_LOAD_REGPAIR() macro 2022-11-21 13:36:15 +01:00
extmem.c s390/extmem: improve reporting of -ERANGE error 2023-07-24 12:12:24 +02:00
fault.c ARM: 2023-09-07 13:52:20 -07:00
gmap.c s390/mm: add missing arch_set_page_dat() call to gmap allocations 2023-11-28 17:20:05 +00:00
hugetlbpage.c mm: hugetlb: add huge page size param to set_huge_pte_at() 2023-09-29 17:20:47 -07:00
init.c s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion 2023-09-05 20:12:51 +02:00
maccess.c s390/mm: define Real Memory Copy size and mask macros 2023-08-16 15:13:02 +02:00
Makefile s390/mm: move pfault code to own C file 2023-07-29 14:57:18 +02:00
mmap.c mm: move 'mmap_min_addr' logic from callers into vm_unmapped_area() 2023-04-21 14:52:05 -07:00
page-states.c s390/cmma: fix detection of DAT pages 2023-11-28 17:20:05 +00:00
pageattr.c more s390 updates for 6.6 merge window 2023-09-07 10:52:13 -07:00
pfault.c s390/pfault: use consistent comment style 2023-07-29 14:57:18 +02:00
pgalloc.c s390/mm: add missing arch_set_page_dat() call to gmap allocations 2023-11-28 17:20:05 +00:00
pgtable.c s390: allow pte_offset_map_lock() to fail 2023-06-19 16:19:09 -07:00
vmem.c s390/mm: add missing arch_set_page_dat() call to vmem_crst_alloc() 2023-11-28 17:20:05 +00:00