diff options
author | Tianyu Lan <Tianyu.Lan@microsoft.com> | 2022-05-10 10:21:09 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-05-17 11:21:52 +0200 |
commit | 82806744fd7dde603b64c151eeddaa4ee62193fd (patch) | |
tree | 6c786e6c1cc169caa1ada407b9b2c5d03a443cba /arch/powerpc | |
parent | 1b8e5d1a53696d92374acce2b19a649427f1ec1e (diff) |
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>
Diffstat (limited to 'arch/powerpc')
0 files changed, 0 insertions, 0 deletions