Commit 7d3b03ce7bff9d39ebaee1bb8de1968c4434b883

Authored by Keshavamurthy, Anil S
Committed by Linus Torvalds
1 parent eb3fa7cb51

Intel IOMMU: Intel iommu cmdline option - forcedac

Introduce intel_iommu=forcedac commandline option.  This option is helpful to
verify the pci device capability of handling physical dma'able address greater
than 4G.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 2 changed files with 13 additions and 1 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -781,6 +781,13 @@
781 781 bypassed by not enabling DMAR with this option. In
782 782 this case, gfx device will use physical address for
783 783 DMA.
  784 + forcedac [x86_64]
  785 + With this option iommu will not optimize to look
  786 + for io virtual address below 32 bit forcing dual
  787 + address cycle on pci bus for cards supporting greater
  788 + than 32 bit addressing. The default is to look
  789 + for translation below 32 bit and if not available
  790 + then look in the higher range.
784 791  
785 792 io7= [HW] IO7 for Marvel based alpha systems
786 793 See comment before marvel_specify_io7 in
drivers/pci/intel-iommu.c
... ... @@ -54,6 +54,7 @@
54 54  
55 55 static int dmar_disabled;
56 56 static int __initdata dmar_map_gfx = 1;
  57 +static int dmar_forcedac;
57 58  
58 59 #define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
59 60 static DEFINE_SPINLOCK(device_domain_lock);
... ... @@ -71,6 +72,10 @@
71 72 dmar_map_gfx = 0;
72 73 printk(KERN_INFO
73 74 "Intel-IOMMU: disable GFX device mapping\n");
  75 + } else if (!strncmp(str, "forcedac", 8)) {
  76 + printk (KERN_INFO
  77 + "Intel-IOMMU: Forcing DAC for PCI devices\n");
  78 + dmar_forcedac = 1;
74 79 }
75 80  
76 81 str += strcspn(str, ",");
... ... @@ -1558,7 +1563,7 @@
1558 1563  
1559 1564 start_addr = IOVA_START_ADDR;
1560 1565  
1561   - if (pdev->dma_mask <= DMA_32BIT_MASK) {
  1566 + if ((pdev->dma_mask <= DMA_32BIT_MASK) || (dmar_forcedac)) {
1562 1567 iova = iommu_alloc_iova(domain, addr, size, start_addr,
1563 1568 pdev->dma_mask);
1564 1569 } else {