Thread (28 messages) 28 messages, 4 authors, 2025-02-19

Re: [PATCH v1 01/13] genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie

From: Jacob Pan <hidden>
Date: 2025-02-13 21:33:23
Also in: linux-iommu, linux-kselftest, linux-patches, lkml

Hi Nicolin,

On Thu, 13 Feb 2025 13:02:27 -0800
Nicolin Chen [off-list ref] wrote:
On Thu, Feb 13, 2025 at 12:28:49PM -0800, Jacob Pan wrote:
quoted
Hi Nicolin,

On Sat, 8 Feb 2025 01:02:34 -0800
Nicolin Chen [off-list ref] wrote:
  
quoted
-static inline void msi_desc_set_iommu_cookie(struct msi_desc
*desc,
-					     const void
*iommu_cookie) +/**
+ * iommu_dma_compose_msi_msg() - Apply translation to an MSI
message
+ * @desc: MSI descriptor prepared by iommu_dma_prepare_msi()
+ * @msg: MSI message containing target physical address
+ */  
Is it IOVA not PA?  
This is moved from dma-iommu.c so we didn't change that.

And I think it's correct to say "target physical address" as the
irqchip driver does pass in a PA via @msg.

Then iommu_dma_compose_msi_msg() kind of reverse-translates that,
overwriting the msg with the "IOVA" from @desc.
It is just confusing that the msg can be IOVA, not always PA as the
comment says. I see it gets deleted anyway in the next patch :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help