aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dma_remapping.h
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2009-04-24 20:30:20 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-04-29 01:54:34 -0400
commit4ed0d3e6c64cfd9ba4ceb2099b10d1cf8ece4320 (patch)
tree950bacfaf57040aafbcc2ea9b52eb171d35c23bd /include/linux/dma_remapping.h
parent091069740304c979f957ceacec39c461d0192158 (diff)
Intel IOMMU Pass Through Support
The patch adds kernel parameter intel_iommu=pt to set up pass through mode in context mapping entry. This disables DMAR in linux kernel; but KVM still runs on VT-d and interrupt remapping still works. In this mode, kernel uses swiotlb for DMA API functions but other VT-d functionalities are enabled for KVM. KVM always uses multi level translation page table in VT-d. By default, pass though mode is disabled in kernel. This is useful when people don't want to enable VT-d DMAR in kernel but still want to use KVM and interrupt remapping for reasons like DMAR performance concern or debug purpose. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Weidong Han <weidong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/dma_remapping.h')
-rw-r--r--include/linux/dma_remapping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index 1a455f1f86d7..e0a03aff63d9 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -13,6 +13,9 @@
13#define DMA_PTE_WRITE (2) 13#define DMA_PTE_WRITE (2)
14#define DMA_PTE_SNP (1 << 11) 14#define DMA_PTE_SNP (1 << 11)
15 15
16#define CONTEXT_TT_MULTI_LEVEL 0
17#define CONTEXT_TT_PASS_THROUGH 2
18
16struct intel_iommu; 19struct intel_iommu;
17struct dmar_domain; 20struct dmar_domain;
18struct root_entry; 21struct root_entry;
@@ -21,11 +24,16 @@ extern void free_dmar_iommu(struct intel_iommu *iommu);
21 24
22#ifdef CONFIG_DMAR 25#ifdef CONFIG_DMAR
23extern int iommu_calculate_agaw(struct intel_iommu *iommu); 26extern int iommu_calculate_agaw(struct intel_iommu *iommu);
27extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
24#else 28#else
25static inline int iommu_calculate_agaw(struct intel_iommu *iommu) 29static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
26{ 30{
27 return 0; 31 return 0;
28} 32}
33static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu)
34{
35 return 0;
36}
29#endif 37#endif
30 38
31extern int dmar_disabled; 39extern int dmar_disabled;