android_kernel_xiaomi_sm8450/arch/s390
Heiko Carstens c922282d11 s390/cmma: fix detection of DAT pages
[ Upstream commit 44d93045247661acbd50b1629e62f415f2747577 ]

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: Sasha Levin <sashal@kernel.org>
2023-12-08 08:46:14 +01:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/ipl: add missing intersection check to ipl_report handling 2023-03-22 13:30:05 +01:00
configs s390: update defconfigs 2020-11-12 12:10:36 +01:00
crypto s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs 2023-09-19 12:20:07 +02:00
hypfs s390/hypfs: avoid error message under KVM 2022-09-05 10:28:57 +02:00
include s390/debug: add _ASM_S390_ prefix to header guard 2023-02-01 08:23:16 +01:00
kernel s390/ipl: add missing secure/has_secure file to ipl type 'unknown' 2023-09-19 12:20:22 +02:00
kvm KVM: s390: fix sthyi error handling 2023-08-11 11:57:47 +02:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-04-05 11:23:51 +02:00
mm s390/cmma: fix detection of DAT pages 2023-12-08 08:46:14 +01:00
net bpf, s390: Fix potential memory leak about jit_data 2021-10-13 10:04:29 +02:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: fix iommu bitmap allocation 2023-10-25 11:54:25 +02:00
purgatory s390/purgatory: disable branch profiling 2023-06-28 10:28:15 +02:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig s390: remove unneeded 'select BUILD_BIN2C' 2022-07-07 17:52:18 +02:00
Kconfig.debug s390/mm,ptdump: convert to generic page table dumper 2020-09-14 11:38:34 +02:00
Makefile s390/decompressor: fix misaligned symbol build error 2023-07-27 08:44:31 +02:00