Messages in this thread Patch in this message | | | From | Bhavesh Davda <> | Date | Fri, 16 Jan 2009 15:54:12 -0800 | Subject | [PATCH] intel-iommu: intel_iommu_domain_alloc should check 'dmar_disabled' |
| |
intel_iommu_domain_alloc() will try and iommu_alloc_domain(iommu), which calls alloc_domain_mem() to allocate out of 'iommu_domain_cache'. Unfortunately iommu_domain_cache will not be created if booted with "intel_iommu=off", i.e. dmar_disabled = 1.
This fixes that.
Signed-off-by: Bhavesh P. Davda <bhavesh@vmware.com> --- drivers/pci/intel-iommu.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 5c8baa4..06237a8 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -2356,6 +2356,11 @@ struct dmar_domain *intel_iommu_domain_alloc(struct pci_dev *pdev) struct dmar_domain *domain; struct intel_iommu *iommu;
+ if (dmar_disabled) { + printk(KERN_ERR "intel_iommu_domain_alloc: Intel-IOMMU disabled\n"); + return NULL; + } + drhd = dmar_find_matched_drhd_unit(pdev); if (!drhd) { printk(KERN_ERR "intel_iommu_domain_alloc: drhd == NULL\n"); -- 1.5.6.3
| |