iommu/vt-d: Introduce macros useful for dumping DMAR table
authorSai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Fri, 24 May 2019 23:40:16 +0000 (16:40 -0700)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 14:16:09 +0000 (16:16 +0200)
commitcdd3a2499d30695730b22dc025c00b9b28884c6b
treee6b9a78cf6c89d436bf89fe43f630fde179fafb1
parentea09506c363e90ef0b7532fdcf187bb67281a5e6
iommu/vt-d: Introduce macros useful for dumping DMAR table

A scalable mode DMAR table walk would involve looking at bits in each stage
of walk, like,
1. Is PASID enabled in the context entry?
2. What's the size of PASID directory?
3. Is the PASID directory entry present?
4. Is the PASID table entry present?
5. Number of PASID table entries?

Hence, add these macros that will later be used during this walk.
Apart from adding new macros, move existing macros (like
pasid_pde_is_present(), get_pasid_table_from_pde() and pasid_supported())
to appropriate header files so that they could be reused.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Sohil Mehta <sohil.mehta@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c
drivers/iommu/intel-pasid.c
drivers/iommu/intel-pasid.h
include/linux/intel-iommu.h