Tianyu Lan 82806744fd swiotlb: max mapping size takes min align mask into account
swiotlb_find_slots() skips slots according to io tlb aligned mask
calculated from min aligned mask and original physical address
offset. This affects max mapping size. The mapping size can't
achieve the IO_TLB_SEGSIZE * IO_TLB_SIZE when original offset is
non-zero. This will cause system boot up failure in Hyper-V
Isolation VM where swiotlb force is enabled. Scsi layer use return
value of dma_max_mapping_size() to set max segment size and it
finally calls swiotlb_max_mapping_size(). Hyper-V storage driver
sets min align mask to 4k - 1. Scsi layer may pass 256k length of
request buffer with 0~4k offset and Hyper-V storage driver can't
get swiotlb bounce buffer via DMA API. Swiotlb_find_slots() can't
find 256k length bounce buffer with offset. Make swiotlb_max_mapping
_size() take min align mask into account.

Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-05-17 11:21:52 +02:00
..
2022-03-28 12:41:28 -07:00
2021-12-02 17:25:21 +09:00
2022-01-11 09:51:26 -08:00
2022-03-28 17:29:53 -07:00
2022-03-22 13:44:21 -07:00
2022-03-21 16:48:55 -07:00
2022-03-23 10:54:27 -07:00
2022-03-22 14:39:12 -07:00
\n
2021-11-06 16:43:20 -07:00
2022-01-11 13:08:21 -08:00
2022-03-21 20:53:11 -07:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2022-03-15 10:32:44 +01:00
2022-03-28 17:29:53 -07:00
2021-06-18 11:43:08 +02:00
2021-09-08 15:32:34 -07:00
2021-05-07 00:26:33 -07:00
2022-03-23 18:03:08 -07:00
2022-02-28 10:26:40 -05:00
2021-10-14 13:29:18 +02:00
2022-01-08 12:43:57 -06:00
2022-03-28 17:29:53 -07:00
2022-02-25 09:36:06 +01:00
2022-03-08 14:33:36 -06:00
2021-05-07 00:26:34 -07:00