iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Preferred method to detect if a device is behind an enabled iommu.
@ 2018-02-01 10:18 Jonathan Cameron
       [not found] ` <20180201101821.00006a16-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2018-02-01 10:18 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linuxarm-hv44wF8Li93QT0dZR+AlfA

Hi All,

We have a crypto accelerator which needs to have a few different settings
depending on whether or not the SMMUv3 is enabled and translating addresses
or not.

https://marc.info/?l=linux-crypto-vger&m=151732626428206&w=2

1) A quirk of the hardware revision means we need to turn some elements
   off if the iommu is enabled.
2) The device has certain cache related settings that means it needs to know
   if it is dealing with VAs or PAs.

Current approach is to see if the iommu_group is set in struct device.

We could fine one instance of another driver doing this and copied that,
(drivers/dma/rcar-dmac.c)
but the precedence is weak enough that confirmation would be good.
So whilst it 'works' the question is whether it is safe in general
and whether there is a better way.

Thanks,

--
Jonathan Cameron
Huawei

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

end of thread, other threads:[~2018-02-01 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 10:18 Preferred method to detect if a device is behind an enabled iommu Jonathan Cameron
     [not found] ` <20180201101821.00006a16-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-02-01 12:49   ` Robin Murphy
     [not found]     ` <433fcde8-bcd6-9ab0-ffc5-baf0a6634379-5wv7dgnIgG8@public.gmane.org>
2018-02-01 13:25       ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).