Skip to contentSkip to conversation

Question about transfer memory using DMAC belonging to IOMMU group

DISCUSSION Kunihiko Hayashi 1 participant 1 message Oct 12, 2021

lore
Share & tools
lore
#0 lore raw

Hi all,

Now I'm trying to transfer between arbitrary memories using DMAC channel with dma_request_channel(). This transfer works fine.

However, when DMAC belongs to an IOMMU group, it fails.

I tried to transfer memory allocated from "reserved-memory" of the other device (not IOMMU master), and it failed.

It's possible to transfer the allocated memory by calling dma_alloc_cohenrent() with DMAC device. The dmatest is an example.

I think it's necessary to join the device associated with the reserved-memory to the same IOMMU group as DMAC or something.

In case of using arm-smmu-v3, that will cause BUG_ON() when specifying the same "iommus" property in devicetree as DMAC.

Are there any methods to join the device to the IOMMU group? Or transfer arbitrary memories using DMAC belonging to the IOMMU group?

Thank you,

---
Best Regards
Kunihiko Hayashi
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu