Skip to content

Commit

Permalink
iommu/vt-d: Loose requirement for flush queue initializaton
Browse files Browse the repository at this point in the history
Currently if flush queue initialization fails, we return error
or enforce the system-wide strict mode. These are unnecessary
because we always check the existence of a flush queue before
queuing any iova's for lazy flushing. Printing a informational
message is enough.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Lu Baolu authored and Joerg Roedel committed Jan 7, 2020
1 parent 10f8008 commit 8e3391c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,15 +1854,15 @@ static int domain_init(struct dmar_domain *domain, struct intel_iommu *iommu,
{
int adjust_width, agaw;
unsigned long sagaw;
int err;
int ret;

init_iova_domain(&domain->iovad, VTD_PAGE_SIZE, IOVA_START_PFN);

if (!intel_iommu_strict) {
err = init_iova_flush_queue(&domain->iovad,
ret = init_iova_flush_queue(&domain->iovad,
iommu_flush_iova, iova_entry_free);
if (err)
return err;
if (ret)
pr_info("iova flush queue initialization failed\n");
}

domain_reserve_special_ranges(domain);
Expand Down Expand Up @@ -5222,10 +5222,8 @@ static struct iommu_domain *intel_iommu_domain_alloc(unsigned type)
ret = init_iova_flush_queue(&dmar_domain->iovad,
iommu_flush_iova,
iova_entry_free);
if (ret) {
pr_warn("iova flush queue initialization failed\n");
intel_iommu_strict = 1;
}
if (ret)
pr_info("iova flush queue initialization failed\n");
}

domain_update_iommu_cap(dmar_domain);
Expand Down

0 comments on commit 8e3391c

Please sign in to comment.