From: Lu Baolu <baolu.lu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: "Pranjal Shrivastava" <praan@google.com>,
"Guanghui Feng" <guanghuifeng@linux.alibaba.com>,
"Michał Grzelak" <michal.grzelak@intel.com>,
"Michael Bommarito" <michael.bommarito@gmail.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/5] iommu/vt-d: Improve IOMMU fault information
Date: Thu, 4 Jun 2026 14:03:09 +0800 [thread overview]
Message-ID: <20260604060311.365074-5-baolu.lu@linux.intel.com> (raw)
In-Reply-To: <20260604060311.365074-1-baolu.lu@linux.intel.com>
From: Guanghui Feng <guanghuifeng@linux.alibaba.com>
In some environments, multiple PCIe segments exist, and PCIe device
information needs to be differentiated and identified based on the
segment. When an IOMMU fault event occurs, the IOMMU and device segment
information should be output in detail in dmar_fault_do_one.
Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
Link: https://lore.kernel.org/r/20260528022943.1697564-1-guanghuifeng@linux.alibaba.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
drivers/iommu/intel/dmar.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index d33c119a935e..767ec092accd 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -1894,7 +1894,8 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type,
reason = dmar_get_fault_reason(fault_reason, &fault_type);
if (fault_type == INTR_REMAP) {
- pr_err("[INTR-REMAP] Request device [%02x:%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n",
+ pr_err("[INTR-REMAP] Request device [%04x:%02x:%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n",
+ iommu->segment,
source_id >> 8, PCI_SLOT(source_id & 0xFF),
PCI_FUNC(source_id & 0xFF), addr >> 48,
fault_reason, reason);
@@ -1903,14 +1904,16 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type,
}
if (pasid == IOMMU_PASID_INVALID)
- pr_err("[%s NO_PASID] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
+ pr_err("[%s NO_PASID] Request device [%04x:%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
type ? "DMA Read" : "DMA Write",
+ iommu->segment,
source_id >> 8, PCI_SLOT(source_id & 0xFF),
PCI_FUNC(source_id & 0xFF), addr,
fault_reason, reason);
else
- pr_err("[%s PASID 0x%x] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
+ pr_err("[%s PASID 0x%x] Request device [%04x:%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
type ? "DMA Read" : "DMA Write", pasid,
+ iommu->segment,
source_id >> 8, PCI_SLOT(source_id & 0xFF),
PCI_FUNC(source_id & 0xFF), addr,
fault_reason, reason);
--
2.43.0
next prev parent reply other threads:[~2026-06-04 6:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 6:03 [PATCH v2 0/5] [PULL REQUEST] Intel IOMMU updates for v7.2 Lu Baolu
2026-06-04 6:03 ` [PATCH v2 1/5] iommu/vt-d: Avoid WARNING in sva unbind path Lu Baolu
2026-06-04 6:03 ` [PATCH v2 2/5] iommu/vt-d: Clear Present bit before tearing down scalable-mode context entry Lu Baolu
2026-06-04 6:03 ` [PATCH v2 3/5] iommu/vt-d: Remove typo from pasid_pte_config_nested() Lu Baolu
2026-06-04 6:03 ` Lu Baolu [this message]
2026-06-04 6:03 ` [PATCH v2 5/5] iommu/vt-d: Fix RB-tree corruption in probe error path Lu Baolu
2026-06-04 10:02 ` [PATCH v2 0/5] [PULL REQUEST] Intel IOMMU updates for v7.2 Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260604060311.365074-5-baolu.lu@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.bommarito@gmail.com \
--cc=michal.grzelak@intel.com \
--cc=praan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.