Merge branch 'amd-iommu/2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorIngo Molnar <mingo@elte.hu>
Fri, 4 Sep 2009 12:44:16 +0000 (14:44 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 4 Sep 2009 12:44:16 +0000 (14:44 +0200)
1  2 
arch/x86/kernel/pci-dma.c

@@@ -32,7 -32,14 +32,14 @@@ int no_iommu __read_mostly
  /* Set this to 1 if there is a HW IOMMU in the system */
  int iommu_detected __read_mostly = 0;
  
- int iommu_pass_through;
+ /*
+  * This variable becomes 1 if iommu=pt is passed on the kernel command line.
+  * If this variable is 1, IOMMU implementations do no DMA ranslation for
+  * devices and allow every device to access to whole physical memory. This is
+  * useful if a user want to use an IOMMU only for KVM device assignment to
+  * guests and not for driver dma translation.
+  */
+ int iommu_pass_through __read_mostly;
  
  dma_addr_t bad_dma_address __read_mostly = 0;
  EXPORT_SYMBOL(bad_dma_address);
@@@ -147,7 -154,7 +154,7 @@@ again
                return NULL;
  
        addr = page_to_phys(page);
 -      if (!is_buffer_dma_capable(dma_mask, addr, size)) {
 +      if (addr + size > dma_mask) {
                __free_pages(page, get_order(size));
  
                if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {