From: "guanghuifeng@linux.alibaba.com" <guanghuifeng@linux.alibaba.com>
To: Baolu Lu <baolu.lu@linux.intel.com>,
dwmw2@infradead.org, joro@8bytes.org, will@kernel.org,
robin.murphy@arm.com, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org
Cc: xlpang@linux.alibaba.com, oliver.yang@linux.alibaba.com
Subject: Re: [PATCH] iommu/vt-d: improve IOMMU fault information
Date: Thu, 28 May 2026 10:14:52 +0800 [thread overview]
Message-ID: <4adaa6b9-6dc0-4d78-8eeb-dbe9059e76a8@linux.alibaba.com> (raw)
In-Reply-To: <f7c018b4-01e0-4693-99aa-de8d370c8a42@linux.intel.com>
在 2026/5/26 9:57, Baolu Lu 写道:
> On 5/25/26 11:47, Guanghui Feng wrote:
>> 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>
>> ---
>> drivers/iommu/intel/dmar.c | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
>> index d33c119a935e..ca9afbb55e76 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("[DMAR:%s] [INTR-REMAP] Request device
>> [%04x:%02x:%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n",
>> + iommu->name, iommu->segment,
>> source_id >> 8, PCI_SLOT(source_id & 0xFF),
>> PCI_FUNC(source_id & 0xFF), addr >> 48,
>> fault_reason, reason);
>> @@ -1903,14 +1904,18 @@ 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("[DMAR:%s] [%s NO_PASID] Request device
>> [%04x:%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
>> + iommu->name,
>
> Do you really need to dump "iommu->name"? It is purely assigned by the
> IOMMU driver software. Do you mind explaining what kind of information
> you want to get from it?
>
Thanks for your reply.
1. In environments with multiple PCIe segments/domains, precise
differentiation based on device information
is needed when an IOMMU fault occurs. Therefore, segment information was
added.
2. Adding IOMMU information to an IOMMU fault is not mandatory. Related
IOMMU information
can be obtained through various methods such as
/sys/bus/pci/devices/[bdf]/iommu.
A new patch will be resubmitted for modification.
>> 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("[DMAR:%s] [%s PASID 0x%x] Request device
>> [%04x:%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
>> + iommu->name,
>> 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);
>
> Thanks,
> baolu
next prev parent reply other threads:[~2026-05-28 2:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 3:47 Guanghui Feng
2026-05-26 1:57 ` Baolu Lu
2026-05-28 2:14 ` guanghuifeng [this message]
2026-05-28 2:29 ` [PATCH v2] " Guanghui Feng
2026-06-01 6:11 ` Baolu Lu
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=4adaa6b9-6dc0-4d78-8eeb-dbe9059e76a8@linux.alibaba.com \
--to=guanghuifeng@linux.alibaba.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xlpang@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome