Joerg Roedel add02cfdc9 iommu: Introduce Interface for IOMMU TLB Flushing
With the current IOMMU-API the hardware TLBs have to be
flushed in every iommu_ops->unmap() call-back.

For unmapping large amounts of address space, like it
happens when a KVM domain with assigned devices is
destroyed, this causes thousands of unnecessary TLB flushes
in the IOMMU hardware because the unmap call-back runs for
every unmapped physical page.

With the TLB Flush Interface and the new iommu_unmap_fast()
function introduced here the need to clean the hardware TLBs
is removed from the unmapping code-path. Users of
iommu_unmap_fast() have to explicitly call the TLB-Flush
functions to sync the page-table changes to the hardware.

Three functions for TLB-Flushes are introduced:

	* iommu_flush_tlb_all() - Flushes all TLB entries
	                          associated with that
				  domain. TLBs entries are
				  flushed when this function
				  returns.

	* iommu_tlb_range_add() - This will add a given
				  range to the flush queue
				  for this domain.

	* iommu_tlb_sync() - Flushes all queued ranges from
			     the hardware TLBs. Returns when
			     the flush is finished.

The semantic of this interface is intentionally similar to
the iommu_gather_ops from the io-pgtable code.

Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2017-08-30 18:07:13 +02:00
..
2017-07-09 18:48:37 -07:00
2017-07-03 20:55:59 -07:00
2017-07-11 09:55:47 -07:00
2017-07-13 12:07:44 -07:00
2017-06-03 19:29:26 +09:00
2017-07-03 01:43:45 -07:00
2017-06-29 17:34:57 +02:00
2017-07-22 08:55:16 -07:00
2017-06-08 18:52:36 -07:00
2017-07-03 17:00:59 -06:00
2017-07-06 16:24:33 -07:00
2017-07-01 16:15:13 -07:00
2017-07-03 02:22:52 -07:00
2017-07-10 10:51:53 -07:00
2017-07-03 16:56:28 -06:00
2017-05-24 12:43:30 -04:00
2017-06-05 16:59:12 +02:00
2017-06-22 15:43:47 +01:00
2017-06-09 11:52:07 +02:00
2017-07-10 16:32:31 -07:00
2017-07-07 09:44:06 -07:00
2017-07-07 09:49:24 +10:00
2017-07-07 20:09:10 -04:00
2017-06-05 16:59:10 +02:00
2017-05-18 10:07:41 -04:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-07-10 16:32:34 -07:00
2017-07-10 10:51:53 -07:00
2017-08-15 18:23:52 +02:00
2017-07-07 18:39:15 -07:00
2017-07-13 16:00:15 -04:00
2017-07-13 16:00:15 -04:00
2017-07-12 16:26:02 -07:00
2017-07-06 11:30:07 -04:00
2017-05-09 15:15:47 -07:00
2017-05-26 10:10:37 +02:00
2017-07-08 15:51:57 -07:00
2017-05-18 10:07:40 -04:00
2017-07-03 15:12:52 -07:00
2017-06-29 10:48:57 +01:00
2017-07-12 23:11:23 +02:00
2017-06-08 10:35:49 +02:00
2017-07-06 16:24:30 -07:00
2017-06-15 12:12:40 -04:00
2017-06-08 18:52:42 -07:00
2017-06-01 14:53:04 -04:00
2017-07-05 17:09:27 -07:00
2017-07-13 12:23:54 -07:00
2017-05-09 16:43:22 +03:00
2017-06-09 11:54:54 +02:00