summaryrefslogtreecommitdiff
path: root/block/Kconfig
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2023-11-06 18:12:30 +0100
committerJuergen Gross <jgross@suse.com>2023-11-17 10:45:46 +0100
commitbff2a2d453a1b683378b4508b86b84389f551a00 (patch)
treed7d9a06c5125d1c7c1b8b69732229b6afb7adfb0 /block/Kconfig
parentcee96422e863f0b0e9d3d0c2d617271ef2255858 (diff)
swiotlb-xen: provide the "max_mapping_size" method
There's a bug that when using the XEN hypervisor with bios with large multi-page bio vectors on NVMe, the kernel deadlocks [1]. The deadlocks are caused by inability to map a large bio vector - dma_map_sgtable always returns an error, this gets propagated to the block layer as BLK_STS_RESOURCE and the block layer retries the request indefinitely. XEN uses the swiotlb framework to map discontiguous pages into contiguous runs that are submitted to the PCIe device. The swiotlb framework has a limitation on the length of a mapping - this needs to be announced with the max_mapping_size method to make sure that the hardware drivers do not create larger mappings. Without max_mapping_size, the NVMe block driver would create large mappings that overrun the maximum mapping size. Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Link: https://lore.kernel.org/stable/ZTNH0qtmint%2FzLJZ@mail-itl/ [1] Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Suggested-by: Christoph Hellwig <hch@lst.de> Cc: stable@vger.kernel.org Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/151bef41-e817-aea9-675-a35fdac4ed@redhat.com Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'block/Kconfig')
0 files changed, 0 insertions, 0 deletions