All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/3] Add debugfs support to show scalable mode DMAR table
@ 2019-05-24 23:40 Sai Praneeth Prakhya
  2019-05-24 23:40 ` [PATCH V3 1/3] iommu/vt-d: Modify the format of intel DMAR tables dump Sai Praneeth Prakhya
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sai Praneeth Prakhya @ 2019-05-24 23:40 UTC (permalink / raw)
  To: iommu; +Cc: Ashok Raj, Andy Shevchenko, David Woodhouse

Presently, "/sys/kernel/debug/iommu/intel/dmar_translation_struct" file dumps
only legacy DMAR table which consists of root table and context table. Scalable
mode DMAR table adds PASID directory and PASID table. Hence, add support to dump
these tables as well.

Directly extending the present dumping format for PASID tables will make the
output look clumsy. Hence, the first patch modifies the present format to a
tabular format. The second patch introduces macros that are used during PASID
table walk and the third patch actually adds support to dump scalable mode DMAR
table.

Changes from V1 to V2:
----------------------
1. Make my name consistent in "From" and "Signed-off-by"
2. Fix comment regarding scalable mode context entries
3. Add reviewed by tags

Changes from V2 to V3:
----------------------
Presently, for V2 patches if kernel command line argument "iommu=pt" is passed,
dumping DMAR table seg faults. This happens because in pass through mode (for
non-scalable DMAR's) 3rd bit of context entry is set and it is misinterpreted as
PASID enabled by debugfs code and hence tries to dereference PASID directory
pointer which leads to seg fault (PASID directory pointer is undefined for
non-scalable DMAR's). To fix this, dereference PASID directory pointer only when
1. PASID is supported and
2. PASID is enabled.

This patch is tested on
1. Non-scalable DMAR with and without iommu=pt
2. Scalable DMAR with and without iommu=pt

Sai Praneeth Prakhya (3):
  iommu/vt-d: Modify the format of intel DMAR tables dump
  iommu/vt-d: Introduce macros useful for dumping DMAR table
  iommu/vt-d: Add debugfs support to show scalable mode DMAR table
    internals

 drivers/iommu/intel-iommu-debugfs.c | 137 +++++++++++++++++++++++++++++-------
 drivers/iommu/intel-iommu.c         |   6 +-
 drivers/iommu/intel-pasid.c         |  17 -----
 drivers/iommu/intel-pasid.h         |  26 +++++++
 include/linux/intel-iommu.h         |   6 ++
 5 files changed, 146 insertions(+), 46 deletions(-)

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>

-- 
2.7.4

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-29 16:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 23:40 [PATCH V3 0/3] Add debugfs support to show scalable mode DMAR table Sai Praneeth Prakhya
2019-05-24 23:40 ` [PATCH V3 1/3] iommu/vt-d: Modify the format of intel DMAR tables dump Sai Praneeth Prakhya
2019-05-24 23:40 ` [PATCH V3 2/3] iommu/vt-d: Introduce macros useful for dumping DMAR table Sai Praneeth Prakhya
2019-05-24 23:40 ` [PATCH V3 3/3] iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals Sai Praneeth Prakhya
2019-05-27 14:16 ` [PATCH V3 0/3] Add debugfs support to show scalable mode DMAR table Joerg Roedel
2019-05-29 16:19   ` Prakhya, Sai Praneeth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.