]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Allow DMA domain attaching to rmrr locked device
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 12 Jun 2019 00:28:48 +0000 (08:28 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 12 Jun 2019 08:36:59 +0000 (10:36 +0200)
commitefd98ac7c066da52ac4a374517d6037d8e7a4174
treed304fa033071f5bf2a191432dac1b8f1ece9c5ee
parent26d9e218673fda2ba28f0c76a4e38d6c4d39e66f
iommu/vt-d: Allow DMA domain attaching to rmrr locked device

We don't allow a device to be assigned to user level when it is locked
by any RMRR's. Hence, intel_iommu_attach_device() will return error if
a domain of type IOMMU_DOMAIN_UNMANAGED is about to attach to a device
locked by rmrr. But this doesn't apply to a domain of type other than
IOMMU_DOMAIN_UNMANAGED. This adds a check to fix this.

Fixes: ba67bc47be789 ("iommu/vt-d: Delegate the dma domain to upper layer")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reported-and-tested-by: Qian Cai <cai@lca.pw>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c