IOMMU Fixes for Linux v5.1-rc2

Including:

	- AMD IOMMU fix for sg-mapping with sg->offset > PAGE_SIZE

	- Fix for IOVA code to trigger the slow-path less often

	- Two fixes for Intel VT-d to avoid writing to read-onl registers and
	  to flush the right domain id for the default domains in scalable
	  mode
iommu/vt-d: Save the right domain ID used by hardware

The driver sets a default domain id (FLPT_DEFAULT_DID) in the
first level only pasid entry, but saves a different domain id
in @sdev->did. The value saved in @sdev->did will be used to
invalidate the translation caches. Hence, the driver might
result in invalidating the caches with a wrong domain id.

Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode")
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed