Skip to contentSkip to conversation

x86/VT-d: Drop unhelpful information in diagnostics

PATCH In review Andrew Cooper 5 participants 5 messages Oct 11, 2019 – Oct 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/VT-d: Drop unhelpful information in diagnostics

The virtual address of the base of the IOMMU's regsters is not useful for diagnostic purposes, and is quite voluminous. The PCI coordinates is by far the most useful piece of identifying information.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
CC: Juergen Gross <[email protected]>

Surrounding printk()s also identify the IOMMU by Xen's internal ID, but that is also pretty useless information when diagnosing problems.

RFC for-4.13. This is a nice to have stylistic improvement.

---
 xen/drivers/passthrough/vtd/iommu.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
xen/drivers/passthrough/vtd/iommu.c +6 -6
index f08eec070d..0522ecd3bc 100644
@@ -842,26 +842,26 @@ static int iommu_page_fault_do_one(struct vtd_iommu *iommu, int type,
     case DMA_REMAP:
         printk(XENLOG_G_WARNING VTDPREFIX
                "DMAR:[%s] Request device [%04x:%02x:%02x.%u] "
-               "fault addr %"PRIx64", iommu reg = %p\n",
+               "fault addr %"PRIx64"\n",
                (type ? "DMA Read" : "DMA Write"),
                seg, PCI_BUS(source_id), PCI_SLOT(source_id),
-               PCI_FUNC(source_id), addr, iommu->reg);
+               PCI_FUNC(source_id), addr);
         kind = "DMAR";
         break;
     case INTR_REMAP:
         printk(XENLOG_G_WARNING VTDPREFIX
                "INTR-REMAP: Request device [%04x:%02x:%02x.%u] "
-               "fault index %"PRIx64", iommu reg = %p\n",
+               "fault index %"PRIx64"\n",
                seg, PCI_BUS(source_id), PCI_SLOT(source_id),
-               PCI_FUNC(source_id), addr >> 48, iommu->reg);
+               PCI_FUNC(source_id), addr >> 48);
         kind = "INTR-REMAP";
         break;
     default:
         printk(XENLOG_G_WARNING VTDPREFIX
                "UNKNOWN: Request device [%04x:%02x:%02x.%u] "
-               "fault addr %"PRIx64", iommu reg = %p\n",
+               "fault addr %"PRIx64"\n",
                seg, PCI_BUS(source_id), PCI_SLOT(source_id),
-               PCI_FUNC(source_id), addr, iommu->reg);
+               PCI_FUNC(source_id), addr);
         kind = "UNKNOWN";
         break;
     }
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Andrew Cooper

The virtual address of the base of the IOMMU's regsters is not useful for diagnostic purposes, and is quite voluminous. The PCI coordinates is by far the most useful piece of identifying information.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
CC: Juergen Gross <[email protected]>

Quoted 4 lines

Surrounding printk()s also identify the IOMMU by Xen's internal ID, but that is also pretty useless information when diagnosing problems.

RFC for-4.13. This is a nice to have stylistic improvement.

I don't think the register is useful for debugging, at least I have never used it myself, so:

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by
#2 lore raw
Quoted 17 lines · Roger Pau Monné
Quoted 16 lines · Andrew Cooper

The virtual address of the base of the IOMMU's regsters is not useful for diagnostic purposes, and is quite voluminous. The PCI coordinates is by far the most useful piece of identifying information.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
CC: Juergen Gross <[email protected]>

Surrounding printk()s also identify the IOMMU by Xen's internal ID, but that is also pretty useless information when diagnosing problems.

Quoted 6 lines
Quoted 1 line

RFC for-4.13. This is a nice to have stylistic improvement.

I don't think the register is useful for debugging, at least I have never used it myself, so:

Seeing that there hasn't been an ack from Kevin, perhaps this rather simple change can go in without? Just in case

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 25 lines

From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, October 23, 2019 10:00 PM

Quoted 3 lines · Roger Pau Monné
Quoted 2 lines · Andrew Cooper

The virtual address of the base of the IOMMU's regsters is not useful for diagnostic purposes, and is quite voluminous. The PCI coordinates is by

far

Quoted 11 lines
Quoted 11 lines

the most useful piece of identifying information.

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
CC: Juergen Gross <[email protected]>

Quoted 1 line
Quoted 1 line

Surrounding printk()s also identify the IOMMU by Xen's internal ID, but

that

Quoted 4 lines
Quoted 3 lines

is also pretty useless information when diagnosing problems.

RFC for-4.13. This is a nice to have stylistic improvement.

Quoted 9 lines
Quoted 4 lines

I don't think the register is useful for debugging, at least I have never used it myself, so:

Seeing that there hasn't been an ack from Kevin, perhaps this rather simple change can go in without? Just in case

I overlooked at it. Acked-by: Kevin Tian <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
In reply to Andrew Cooper
Quoted 5 lines · Andrew Cooper

The virtual address of the base of the IOMMU's regsters is not useful for diagnostic purposes, and is quite voluminous. The PCI coordinates is by far the most useful piece of identifying information.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel