s390/pv: Enable SWIOTLB_ANY for s390 PV

In s390 protected virtualization (PV) environments, guests use SWIOTLB
for virtio DMA. Because SWIOTLB_ANY is currently not passed to
swiotlb_init(), the SWIOTLB buffer is allocated from low memory, i.e.
from the first 2G of the physical address space on s390.

This restriction is unnecessary for s390 PV guests and limits the
available address range for the SWIOTLB buffer. In turn, that can limit
the maximum practical SWIOTLB size and make larger allocations more
likely to fail at boot, especially under memory fragmentation.

Pass SWIOTLB_ANY in pv_init() so the SWIOTLB buffer can be allocated
from any suitable memory instead of being restricted to low memory.

Signed-off-by: Jaehoon Kim <jhkim@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Joshua Daley <jdaley@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Jaehoon Kim 2026-05-19 11:49:33 -05:00 committed by Vasily Gorbik
parent a7325d0d77
commit 28b0d68974

View File

@ -151,7 +151,7 @@ static void __init pv_init(void)
virtio_set_mem_acc_cb(virtio_require_restricted_mem_acc);
/* make sure bounce buffers are shared */
swiotlb_init(true, SWIOTLB_FORCE | SWIOTLB_VERBOSE);
swiotlb_init(true, SWIOTLB_FORCE | SWIOTLB_VERBOSE | SWIOTLB_ANY);
swiotlb_update_mem_attributes();
}