On Fri, Jan 22, 2021 at 08:01:17PM +0200, Lauri Kasanen wrote: > On Fri, 22 Jan 2021 09:11:20 -0800 > Keith Busch <kbusch@xxxxxxxxxx> wrote: > > Each bio_vec segment is physically contiguous. > > What's the official way to get that buffer's physical address? I > couldn't find any driver that does DMA to the bio buffer, to use as an > example. Maybe used wrong keywords. In Linux we never DMA to the physical address, but the DMA address. For a bio with just a single bvec (that is a single contigous segment) we have the dma_map_bvec helper that is only used by the nvme-pci driver for special optimizations in the case of a single contigous segment.