History

iommu/vt-d: debugfs: Add support to show page table internals

Export page table internals of the domain attached to each device. Example of such dump on a Skylake machine: $ sudo cat /sys/kernel/debug/iommu/intel/domain_translation_struct [ ... ] Device 0000:00:14.0 with pasid 0 @0x15f3d9000 IOVA_PFN PML5E PML4E 0x000000008ced0 | 0x0000000000000000 0x000000015f3da003 0x000000008ced1 | 0x0000000000000000 0x000000015f3da003 0x000000008ced2 | 0x0000000000000000 0x000000015f3da003 0x000000008ced3 | 0x0000000000000000 0x000000015f3da003 0x000000008ced4 | 0x0000000000000000 0x000000015f3da003 0x000000008ced5 | 0x0000000000000000 0x000000015f3da003 0x000000008ced6 | 0x0000000000000000 0x000000015f3da003 0x000000008ced7 | 0x0000000000000000 0x000000015f3da003 0x000000008ced8 | 0x0000000000000000 0x000000015f3da003 0x000000008ced9 | 0x0000000000000000 0x000000015f3da003 PDPE PDE PTE 0x000000015f3db003 0x000000015f3dc003 0x000000008ced0003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced1003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced2003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced3003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced4003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced5003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced6003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced7003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced8003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced9003 [ ... ]

Lu Baolu committed 6 years ago

Commit e2726da1 parent b802d073 files · +79 −2Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/intel-iommu.h+2−0
@@ -441,6 +441,7 @@ enum { · 440 unmodified lines
441#define VTD_FLAG_SVM_CAPABLE (1 << 2)441#define VTD_FLAG_SVM_CAPABLE (1 << 2)
442 442
443extern int intel_iommu_sm;443extern int intel_iommu_sm;
444extern spinlock_t device_domain_lock;
444 445
445#define sm_supported(iommu) (intel_iommu_sm && ecap_smts((iommu)->ecap))446#define sm_supported(iommu) (intel_iommu_sm && ecap_smts((iommu)->ecap))
446#define pasid_supported(iommu) (sm_supported(iommu) && \447#define pasid_supported(iommu) (sm_supported(iommu) && \
@@ -663,6 +664,7 @@ int for_each_device_domain(int (*fn)(struct device_domain_info *info, · 216 unmodified lines
663 void *data), void *data);664 void *data), void *data);
664void iommu_flush_write_buffer(struct intel_iommu *iommu);665void iommu_flush_write_buffer(struct intel_iommu *iommu);
665int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev);666int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev);
667struct dmar_domain *find_domain(struct device *dev);
666 668
667#ifdef CONFIG_INTEL_IOMMU_SVM669#ifdef CONFIG_INTEL_IOMMU_SVM
668extern void intel_svm_check(struct intel_iommu *iommu);670extern void intel_svm_check(struct intel_iommu *iommu);