Blame view
include/linux/dma_remapping.h
1.1 KB
e61d98d8d x64, x2apic/intr-... |
1 2 3 4 |
#ifndef _DMA_REMAPPING_H #define _DMA_REMAPPING_H /* |
5b6985ce8 intel-iommu: IA64... |
5 |
* VT-d hardware uses 4KiB page size regardless of host page size. |
e61d98d8d x64, x2apic/intr-... |
6 |
*/ |
5b6985ce8 intel-iommu: IA64... |
7 8 9 10 |
#define VTD_PAGE_SHIFT (12) #define VTD_PAGE_SIZE (1UL << VTD_PAGE_SHIFT) #define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT) #define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK) |
e61d98d8d x64, x2apic/intr-... |
11 |
|
6dd9a7c73 intel-iommu: Enab... |
12 13 |
#define VTD_STRIDE_SHIFT (9) #define VTD_STRIDE_MASK (((u64)-1) << VTD_STRIDE_SHIFT) |
e61d98d8d x64, x2apic/intr-... |
14 15 |
#define DMA_PTE_READ (1) #define DMA_PTE_WRITE (2) |
6dd9a7c73 intel-iommu: Enab... |
16 |
#define DMA_PTE_LARGE_PAGE (1 << 7) |
9cf066974 intel-iommu: VT-d... |
17 |
#define DMA_PTE_SNP (1 << 11) |
e61d98d8d x64, x2apic/intr-... |
18 |
|
4ed0d3e6c Intel IOMMU Pass ... |
19 |
#define CONTEXT_TT_MULTI_LEVEL 0 |
93a23a727 VT-d: support the... |
20 |
#define CONTEXT_TT_DEV_IOTLB 1 |
4ed0d3e6c Intel IOMMU Pass ... |
21 |
#define CONTEXT_TT_PASS_THROUGH 2 |
e61d98d8d x64, x2apic/intr-... |
22 |
struct intel_iommu; |
99126f7ce intel-iommu: move... |
23 24 |
struct dmar_domain; struct root_entry; |
e61d98d8d x64, x2apic/intr-... |
25 |
|
e61d98d8d x64, x2apic/intr-... |
26 |
extern void free_dmar_iommu(struct intel_iommu *iommu); |
c66b9906f intel-iommu: fix ... |
27 28 |
#ifdef CONFIG_DMAR |
1b5736839 calculate agaw fo... |
29 |
extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
4ed0d3e6c Intel IOMMU Pass ... |
30 |
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); |
c66b9906f intel-iommu: fix ... |
31 32 33 34 35 |
#else static inline int iommu_calculate_agaw(struct intel_iommu *iommu) { return 0; } |
4ed0d3e6c Intel IOMMU Pass ... |
36 37 38 39 |
static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu) { return 0; } |
c66b9906f intel-iommu: fix ... |
40 |
#endif |
e61d98d8d x64, x2apic/intr-... |
41 |
|
2ae210106 x64, x2apic/intr-... |
42 |
extern int dmar_disabled; |
e61d98d8d x64, x2apic/intr-... |
43 |
#endif |