summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-07-04 09:49:46 (GMT)
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-07-04 09:49:46 (GMT)
commit1b7bc0a1618b4de1e6f55c6d95b790f4ab6fcd9e (patch)
treefa5fbdc5ce15e3726600a23ecfe362d1df5184f8
parent1e4c64c46d413de84cc0b786bd6a9b555ba7d111 (diff)
downloadlinux-1b7bc0a1618b4de1e6f55c6d95b790f4ab6fcd9e.tar.xz
intel-iommu: Fix reattaching of devices to identity mapping domain
When we reattach a device to the si_domain (because it's been removed from a VM), we weren't calling domain_context_mapping() to actually tell the hardware about that. We should really put the call to domain_context_mapping() into domain_add_dev_info() -- we never call the latter without also doing the former, and we can keep the error paths simple that way. But that's a cleanup which can wait for 2.6.32 now. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/pci/intel-iommu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 3e39101..73a5c71 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2475,6 +2475,9 @@ static int iommu_no_mapping(struct pci_dev *pdev)
if (pdev->dma_mask > DMA_BIT_MASK(32)) {
int ret;
ret = domain_add_dev_info(si_domain, pdev);
+ if (ret)
+ return 0;
+ ret = domain_context_mapping(si_domain, pdev, CONTEXT_TT_MULTI_LEVEL);
if (!ret) {
printk(KERN_INFO "64bit %s uses identity mapping\n",
pci_name(pdev));