Lines Matching +full:low +full:- +full:vt
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright © 2006-2015, Intel Corporation.
20 #include <linux/io-64-nonatomic-lo-hi.h>
28 * VT-d hardware uses 4KiB page size regardless of host page size.
32 #define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT)
33 #define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK)
36 #define VTD_STRIDE_MASK (((u64)-1) << VTD_STRIDE_SHIFT)
72 #define DMAR_PLMBASE_REG 0x68 /* PMRR Low addr */
73 #define DMAR_PLMLIMIT_REG 0x6c /* PMRR low limit */
280 #define DMA_FSTS_ITE (1 << 6) /* Invalidation Time-out Error */
291 /* low 64 bit */
292 #define dma_frcd_page_addr(d) (d & (((u64)-1) << PAGE_SHIFT))
304 sts = op(iommu->reg + offset); \
307 if (DMAR_OPERATION_TIMEOUT < (get_cycles() - start_time))\
345 #define QI_IOTLB_GRAN(gran) (((u64)gran) >> (DMA_TLB_FLUSH_GRANU_OFFSET-4))
353 #define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4))
378 /* QI Dev-IOTLB inv granu */
410 #define qi_shift(iommu) (DMAR_IQ_SHIFT + !!ecap_smts((iommu)->ecap))
431 /* 1MB - maximum possible interrupt remapping table size */
473 #define sm_supported(iommu) (intel_iommu_sm && ecap_smts((iommu)->ecap))
475 ecap_pasid((iommu)->ecap))
483 * 1-11: Reserved
484 * 12-63: Context Ptr (12 - (haw-1))
485 * 64-127: Reserved
493 * low 64 bits:
496 * 2-3: translation type
497 * 12-63: address space root
499 * 0-2: address width
500 * 3-6: aval
501 * 8-23: domain id
512 * When VT-d works in the scalable mode, it allows DMA translation to
535 * to VT-d spec, section 9.3 */
546 /* adjusted guest address width, 0 is level 2 30-bit */
560 * The default pasid used for non-SVM
613 /* PCI domain-device relationship */
633 struct device *dev; /* it's NULL for PCIe-to-PCI bridge */
642 if (!ecap_coherent(iommu->ecap)) in __iommu_flush_cache()
655 * 2-6: reserved
657 * 8-10: available
659 * 12-63: Host physcial address
667 pte->val = 0; in dma_clear_pte()
673 return pte->val & VTD_PAGE_MASK & (~DMA_FL_PTE_XD); in dma_pte_addr()
675 /* Must have a full atomic 64-bit read */ in dma_pte_addr()
676 return __cmpxchg64(&pte->val, 0ULL, 0ULL) & in dma_pte_addr()
683 return (pte->val & 3) != 0; in dma_pte_present()
688 return (pte->val & DMA_PTE_LARGE_PAGE); in dma_pte_superpage()
724 * QI_OPT_WAIT_DRAIN - Wait for PRQ drain completion, spec 6.5.2.8.