linux-stable/arch/s390
Heiko Carstens 569955a7bf 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>
2023-11-28 17:15:08 +00:00
..
appldata s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
boot s390/kasan: handle DCSS mapping in memory holes 2023-11-08 14:09:00 +01:00
configs s390 fixes for 6.5-rc5 2023-08-03 09:06:38 -07:00
crypto s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs 2023-09-13 09:53:00 +02:00
hypfs s390/hypfs: remove unused info_blk_hdr__pcpus() function 2022-11-23 16:24:07 +01:00
include s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes 2023-09-13 09:53:00 +02:00
kernel s390/ipl: add missing secure/has_secure file to ipl type 'unknown' 2023-09-13 09:53:55 +02:00
kvm KVM: s390: fix sthyi error handling 2023-07-29 14:56:41 +02:00
lib s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
mm s390/cmma: fix detection of DAT pages 2023-11-28 17:15:08 +00:00
net s390/bpf: Fix unwinding past the trampoline 2023-10-19 23:11:01 +02:00
pci s390/pci: fix iommu bitmap allocation 2023-10-25 12:16:27 +02:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390 updates for 6.5 merge window 2023-06-27 15:49:10 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390/decompressor: fix misaligned symbol build error 2023-06-28 13:57:09 +02:00