From: Baolu Lu <baolu.lu@linux.intel.com>
To: Mostafa Saleh <smostafa@google.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: joro@8bytes.org, robin.murphy@arm.com, will@kernel.org,
jgg@ziepe.ca, kevin.tian@intel.com
Subject: Re: [PATCH] iommu/pages: Fix iommu_pages_flush_incoherent() for non-x86
Date: Mon, 27 Apr 2026 10:50:08 +0800 [thread overview]
Message-ID: <9157ae81-2663-4fc3-b7ca-265fa3d00936@linux.intel.com> (raw)
In-Reply-To: <20260424115051.2082174-1-smostafa@google.com>
On 4/24/26 19:50, Mostafa Saleh wrote:
> The dma_sync_single_for_device() function expects a dma_addr_t, but
> iommu_pages_flush_incoherent() was incorrectly passing a virtual
> address.
>
> Since iommu_pages_start_incoherent() enforces a 1:1 mapping between
> DMA addresses and physical addresses (checked via WARN_ON), we can
> convert the virtual address to a physical address before passing it to
> the DMA API.
>
> This also matches the behaviour of the other non-x86 in
> iommu_pages_free_incoherent(), which uses virt_to_phys(virt);
>
> Fixes: 36ae67b13976 ("iommu/pages: Add support for incoherent IOMMU page table walkers")
> Signed-off-by: Mostafa Saleh<smostafa@google.com>
> ---
> drivers/iommu/iommu-pages.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
next prev parent reply other threads:[~2026-04-27 2:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 11:50 [PATCH] iommu/pages: Fix iommu_pages_flush_incoherent() for non-x86 Mostafa Saleh
2026-04-24 13:07 ` Jason Gunthorpe
2026-04-25 5:36 ` Pranjal Shrivastava
2026-04-27 2:50 ` Baolu Lu [this message]
2026-04-27 11:59 ` Jörg Rödel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9157ae81-2663-4fc3-b7ca-265fa3d00936@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=smostafa@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.