iommu/vt-d: Handle 32bit device with identity default domain
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 25 May 2019 05:41:30 +0000 (13:41 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 28 May 2019 08:19:10 +0000 (10:19 +0200)
commit98b2fffb5e274d73e47d495da2caf213cfa28fc8
tree0bee16b84eed0634da7d6d1270d09c3680c5db1d
parent942067f1b6b97b1e97cd073b0e2815bc499656db
iommu/vt-d: Handle 32bit device with identity default domain

The iommu driver doesn't know whether the bit width of a PCI
device is sufficient for access to the whole system memory.
Hence, the driver checks this when the driver calls into the
dma APIs. If a device is using an identity domain, but the
bit width is less than the system requirement, we need to use
a dma domain instead. This also applies after we delegated
the domain life cycle management to the upper layer.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c