diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2019-04-17 19:24:47 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-04-23 12:23:13 +0100 |
commit | 9ce27afc0830fca07daa3baeb4da44423b0673ef (patch) | |
tree | d1a3e2122eea21803fd0d16b296622e3e1bea69a /lib/raid6/test | |
parent | 2a7e62f51696ad476b7fb8157d73307e20257df7 (diff) | |
download | blackbird-op-linux-9ce27afc0830fca07daa3baeb4da44423b0673ef.tar.gz blackbird-op-linux-9ce27afc0830fca07daa3baeb4da44423b0673ef.zip |
iommu/arm-smmu-v3: Add support for PCI ATS
PCIe devices can implement their own TLB, named Address Translation Cache
(ATC). Enable Address Translation Service (ATS) for devices that support
it and send them invalidation requests whenever we invalidate the IOTLBs.
ATC invalidation is allowed to take up to 90 seconds, according to the
PCIe spec, so it is possible to get a SMMU command queue timeout during
normal operations. However we expect implementations to complete
invalidation in reasonable time.
We only enable ATS for "trusted" devices, and currently rely on the
pci_dev->untrusted bit. For ATS we have to trust that:
(a) The device doesn't issue "translated" memory requests for addresses
that weren't returned by the SMMU in a Translation Completion. In
particular, if we give control of a device or device partition to a VM
or userspace, software cannot program the device to access arbitrary
"translated" addresses.
(b) The device follows permissions granted by the SMMU in a Translation
Completion. If the device requested read+write permission and only
got read, then it doesn't write.
(c) The device doesn't send Translated transactions for an address that
was invalidated by an ATC invalidation.
Note that the PCIe specification explicitly requires all of these, so we
can assume that implementations will cleanly shield ATCs from software.
All ATS translated requests still go through the SMMU, to walk the stream
table and check that the device is actually allowed to send translated
requests.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'lib/raid6/test')
0 files changed, 0 insertions, 0 deletions