Skip to content

iommu/dmar: expose fault counters via sysfs

Yuri Volchkov linux-iommu linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iommu/dmar: collect fault statisticsdrivers/iommu/dmar.c drivers/pci/pci-sysfs.c include/linux/intel-iommu.h +1 more+150 -171 reply
2/2iommu/dmar: catch early fault occurrencesdrivers/iommu/dmar.c drivers/iommu/intel-iommu.c include/linux/intel-iommu.h+52 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] iommu/dmar: expose fault counters via sysfs

For health monitoring, it can be useful to know if iommu is behaving as expected. DMAR faults can be an indicator that a device:
- has been misconfigured, or
- has experienced a hardware hiccup and replacement should be considered, or
- has been issuing faults due to malicious activity

Currently the only way to check if there were any DMAR faults on the host is to scan the dmesg output. However this approach is not very elegant. The information we are looking for can be wrapped out of the buffer, or masked (since it is a rate-limited print) by another device.

The series adds counters for DMAR faults and exposes them via sysfs.

Yuri Volchkov (2):
iommu/dmar: collect fault statistics
iommu/dmar: catch early fault occurrences

 drivers/iommu/dmar.c        | 182 ++++++++++++++++++++++++++++++++----
 drivers/iommu/intel-iommu.c |   1 +
 drivers/pci/pci-sysfs.c     |  20 ++++
 include/linux/intel-iommu.h |   4 +
 include/linux/pci.h         |  11 +++
 5 files changed, 201 insertions(+), 17 deletions(-)
Signature · 12 lines
2.23.0




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879