diff options
| author | Jason Gunthorpe <jgg@nvidia.com> | 2025-10-23 15:22:29 -0300 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2025-11-05 09:47:43 +0100 |
| commit | 36ae67b13976f8fe1fed2bbbc45ed09d0d113d45 (patch) | |
| tree | 6280924571e05cbf051095de03c453422c05bde0 /tools/lib/python | |
| parent | bc5233c0904eb116a4bd94e10cd3666733216063 (diff) | |
iommu/pages: Add support for incoherent IOMMU page table walkers
Some IOMMU HW cannot snoop the CPU cache when it walks the IO page tables.
The CPU is required to flush the cache to make changes visible to the HW.
Provide some helpers from iommu-pages to manage this. The helpers combine
both the ARM and x86 (used in Intel VT-d) versions of the cache flushing
under a single API.
The ARM version uses the DMA API to access the cache flush on the
assumption that the iommu is using a direct mapping and is already marked
incoherent. The helpers will do the DMA API calls to set things up and
keep track of DMA mapped folios using a bit in the ioptdesc so that
unmapping on error paths is cleaner.
The Intel version just calls the arch cache flush call directly and has no
need to cleanup prior to destruction.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
