linux-brain/arch/s390/mm
Halil Pasic 1dc6df795c s390/pv: fix the forcing of the swiotlb
commit 93ebb6828723b8aef114415c4dc3518342f7dcad upstream.

Since commit 903cd0f315fe ("swiotlb: Use is_swiotlb_force_bounce for
swiotlb data bouncing") if code sets swiotlb_force it needs to do so
before the swiotlb is initialised. Otherwise
io_tlb_default_mem->force_bounce will not get set to true, and devices
that use (the default) swiotlb will not bounce despite switolb_force
having the value of SWIOTLB_FORCE.

Let us restore swiotlb functionality for PV by fulfilling this new
requirement.

This change addresses what turned out to be a fragility in
commit 64e1f0c531 ("s390/mm: force swiotlb for protected
virtualization"), which ain't exactly broken in its original context,
but could give us some more headache if people backport the broken
change and forget this fix.

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 903cd0f315fe ("swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing")
Fixes: 64e1f0c531 ("s390/mm: force swiotlb for protected virtualization")
Cc: stable@vger.kernel.org #5.3+
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 12:26:37 +02:00
..
Makefile s390/mm: convert to the generic get_user_pages_fast code 2019-04-23 16:30:04 +02:00
cmm.c s390/cmm: fix information leak in cmm_timeout_handler() 2019-10-31 17:26:48 +01:00
dump_pagetables.c s390/mm: fix dump_pagetables top level page table walking 2019-08-06 13:58:34 +02:00
extmem.c s390/extmem: use refcount_t for refcount 2019-08-21 12:41:43 +02:00
fault.c s390/mm: add fallthrough annotations 2019-07-29 18:05:03 +02:00
gmap.c s390/gmap: improve THP splitting 2020-08-19 08:16:29 +02:00
hugetlbpage.c s390/mm: fix huge pte soft dirty copying 2020-07-16 08:16:47 +02:00
init.c s390/pv: fix the forcing of the swiotlb 2021-09-22 12:26:37 +02:00
kasan_init.c s390/kasan: fix large PMD pages address alignment check 2021-09-15 09:47:28 +02:00
maccess.c s390/maccess: add no DAT mode to kernel_write 2020-07-16 08:16:48 +02:00
mmap.c s390/mm: mmap base does not depend on ADDR_NO_RANDOMIZE personality 2019-06-04 15:03:53 +02:00
page-states.c s390/cmma: reuse kstrtobool for option value parsing 2019-08-26 12:51:18 +02:00
pageattr.c s390/mm: Clear huge page storage keys on enable_skey 2018-07-30 11:20:18 +01:00
pgalloc.c s390/mm: fix page table upgrade vs 2ndary address mode accesses 2020-04-29 16:33:25 +02:00
pgtable.c s390/mm: silence compiler warning when compiling without CONFIG_PGSTE 2019-04-10 17:48:28 +02:00
vmem.c s390: prevent leaking kernel address in BEAR 2020-04-13 10:48:06 +02:00