[PATCH v4 2/2] block-dma: properly take MMIO path
Chaitanya Kulkarni
chaitanyak at nvidia.com
Wed Nov 12 15:57:58 PST 2025
On 11/12/25 11:48, Leon Romanovsky wrote:
> From: Leon Romanovsky<leonro at nvidia.com>
>
> In commit eadaa8b255f3 ("dma-mapping: introduce new DMA attribute to
> indicate MMIO memory"), DMA_ATTR_MMIO attribute was added to describe
> MMIO addresses, which require to avoid any memory cache flushing, as
> an outcome of the discussion pointed in Link tag below.
>
> In case of PCI_P2PDMA_MAP_THRU_HOST_BRIDGE transfer, blk-mq-dm logic
> treated this as regular page and relied on "struct page" DMA flow.
> That flow performs CPU cache flushing, which shouldn't be done here,
> and doesn't set IOMMU_MMIO flag in DMA-IOMMU case.
>
> As a solution, let's encode peer-to-peer transaction type in NVMe IOD
> flags variable and provide it to blk-mq-dma API.
>
> Link:https://lore.kernel.org/all/f912c446-1ae9-4390-9c11-00dce7bf0fd3@arm.com/
> Reviewed-by: Christoph Hellwig<hch at lst.de>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
-ck
More information about the Linux-nvme
mailing list