iommu/vt-d: Fix dmar pte read access not set error
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 11 Dec 2019 01:40:15 +0000 (09:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:45:53 +0000 (16:45 +0100)
commit8a9661847790ad2c0cf16100554f4fac28874ad7
tree58279c7dfbab9a96b23255601744a34bd0d857ed
parent71730ba7914ea2bb8ba311e1423a5c8475178912
iommu/vt-d: Fix dmar pte read access not set error

commit 75d18385394f56db76845d91a192532aba421875 upstream.

If the default DMA domain of a group doesn't fit a device, it
will still sit in the group but use a private identity domain.
When map/unmap/iova_to_phys come through iommu API, the driver
should still serve them, otherwise, other devices in the same
group will be impacted. Since identity domain has been mapped
with the whole available memory space and RMRRs, we don't need
to worry about the impact on it.

Link: https://www.spinics.net/lists/iommu/msg40416.html
Cc: Jerry Snitselaar <jsnitsel@redhat.com>
Reported-by: Jerry Snitselaar <jsnitsel@redhat.com>
Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private")
Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Tested-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/intel-iommu.c