Skip to content

Commit

Permalink
iommu/vt-d: Use iova over first level
Browse files Browse the repository at this point in the history
After we make all map/unmap paths support first level page table.
Let's turn it on if hardware supports scalable mode.

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 64229e8 commit b802d07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,15 +1770,13 @@ static void free_dmar_iommu(struct intel_iommu *iommu)

/*
* Check and return whether first level is used by default for
* DMA translation. Currently, we make it off by setting
* first_level_support = 0, and will change it to -1 after all
* map/unmap paths support first level page table.
* DMA translation.
*/
static bool first_level_by_default(void)
{
struct dmar_drhd_unit *drhd;
struct intel_iommu *iommu;
static int first_level_support = 0;
static int first_level_support = -1;

if (likely(first_level_support != -1))
return first_level_support;
Expand Down

0 comments on commit b802d07

Please sign in to comment.