aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/intel-iommu.c18
-rw-r--r--include/linux/dma_remapping.h22
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 26c5402b6f7c..97c36b2ee611 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -150,6 +150,24 @@ struct dma_pte {
150 (p).val |= ((addr) & VTD_PAGE_MASK); } while (0) 150 (p).val |= ((addr) & VTD_PAGE_MASK); } while (0)
151#define dma_pte_present(p) (((p).val & 3) != 0) 151#define dma_pte_present(p) (((p).val & 3) != 0)
152 152
153struct dmar_domain {
154 int id; /* domain id */
155 struct intel_iommu *iommu; /* back pointer to owning iommu */
156
157 struct list_head devices; /* all devices' list */
158 struct iova_domain iovad; /* iova's that belong to this domain */
159
160 struct dma_pte *pgd; /* virtual address */
161 spinlock_t mapping_lock; /* page table lock */
162 int gaw; /* max guest address width */
163
164 /* adjusted guest address width, 0 is level 2 30-bit */
165 int agaw;
166
167#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
168 int flags;
169};
170
153static void flush_unmaps_timeout(unsigned long data); 171static void flush_unmaps_timeout(unsigned long data);
154 172
155DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0); 173DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0);
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index 9d5874e3bec9..333014468f17 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -9,30 +9,12 @@
9#define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT) 9#define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT)
10#define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK) 10#define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK)
11 11
12struct root_entry;
13
14#define DMA_PTE_READ (1) 12#define DMA_PTE_READ (1)
15#define DMA_PTE_WRITE (2) 13#define DMA_PTE_WRITE (2)
16 14
17struct intel_iommu; 15struct intel_iommu;
18 16struct dmar_domain;
19struct dmar_domain { 17struct root_entry;
20 int id; /* domain id */
21 struct intel_iommu *iommu; /* back pointer to owning iommu */
22
23 struct list_head devices; /* all devices' list */
24 struct iova_domain iovad; /* iova's that belong to this domain */
25
26 struct dma_pte *pgd; /* virtual address */
27 spinlock_t mapping_lock; /* page table lock */
28 int gaw; /* max guest address width */
29
30 /* adjusted guest address width, 0 is level 2 30-bit */
31 int agaw;
32
33#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
34 int flags;
35};
36 18
37/* PCI domain-device relationship */ 19/* PCI domain-device relationship */
38struct device_domain_info { 20struct device_domain_info {