All of lore.kernel.org
 help / color / mirror / Atom feed
* REGRESSION: iommu fails to take address limit into account
@ 2018-05-25  9:48 Ard Biesheuvel
  2018-05-25 10:34 ` Robin Murphy
  2018-05-25 10:35 ` Ard Biesheuvel
  0 siblings, 2 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2018-05-25  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I am looking into an issue where a platform device is wired to a
MMU-500, and for some reason (which is under investigation) the
platform device can not drive all address bits. I can work around this
by limiting the DMA mask to 40 bits in the driver. However, the IORT
table allows me to set the address limit as well, and so I was
expecting this to be taken into account by the SMMU driver.

When the iort/iommu layer sets up the DMA operations,
iommu_dma_init_domain() is entered with the expected values:

base == 0
size == 0x100_0000_0000

However, the iommu layer ends up generating IOVA addresses that have
bits [47:40] set (which is what the MMU-500 supports). Looking closer,
this is not surprising, given that the end_pfn variable that is
calculated in iommu_dma_init_domain() is no longer used after Zhen's
patch aa3ac9469c185 ("iommu/iova: Make dma_32bit_pfn implicit") was
applied.

So effectively, this is a regression, and I would like your help
figuring out how to go about fixing this.

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-25 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25  9:48 REGRESSION: iommu fails to take address limit into account Ard Biesheuvel
2018-05-25 10:34 ` Robin Murphy
2018-05-25 10:35 ` Ard Biesheuvel
2018-05-25 10:49   ` Robin Murphy
2018-05-25 10:52     ` Ard Biesheuvel

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.