Skip to contentSkip to conversation

xen/vpci: Fix msix existing mapping printk

PATCH Superseded Jason Andryuk 3 participants 5 messages Apr 23, 2025 – Apr 24, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/vpci: Fix msix existing mapping printk

The format string lacks a space, so mfn and type run together:
(XEN) d0v0 0000:06:00.7: existing mapping (mfn: 753037type: 0) at 0x1 clobbers MSIX MMIO area

Add a space.

---
 xen/drivers/vpci/msix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/vpci/msix.c +1 -1
index f3804ce047..499810b238 100644
@@ -666,7 +666,7 @@ int vpci_make_msix_hole(const struct pci_dev *pdev)
                 put_gfn(d, start);
                 gprintk(XENLOG_WARNING,
                         "%pp: existing mapping (mfn: %" PRI_mfn
-                        "type: %d) at %#lx clobbers MSIX MMIO area\n",
+                        " type: %d) at %#lx clobbers MSIX MMIO area\n",
                         &pdev->sbdf, mfn_x(mfn), t, start);
                 return -EEXIST;
             }
Signature · 1 line
2.49.0
#1 lore raw
Quoted 5 lines · Jason Andryuk

The format string lacks a space, so mfn and type run together:
(XEN) d0v0 0000:06:00.7: existing mapping (mfn: 753037type: 0) at 0x1 clobbers MSIX MMIO area

Add a space.

Fixes 677053fac17a ("vpci/msix: carve p2m hole for MSIX MMIO regions")

if we want one.

Regards,
Jason

Reviewed-by Denis Mukhin on v1 1/1
#2 lore raw
In reply to Jason Andryuk
Quoted 6 lines · Jason Andryuk

The format string lacks a space, so mfn and type run together:
(XEN) d0v0 0000:06:00.7: existing mapping (mfn: 753037type: 0) at 0x1 clobbers MSIX MMIO area

Add a space.

Quoted 21 lines
---
 xen/drivers/vpci/msix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/vpci/msix.c +1 -2
index f3804ce047..499810b238 100644
@@ -666,7 +666,7 @@ int vpci_make_msix_hole(const struct pci_dev *pdev)
                 put_gfn(d, start);
                 gprintk(XENLOG_WARNING,
                         "%pp: existing mapping (mfn: %" PRI_mfn
-                        "type: %d) at %#lx clobbers MSIX MMIO area\n",
+                        " type: %d) at %#lx clobbers MSIX MMIO area\n",
                         &pdev->sbdf, mfn_x(mfn), t, start);
                 return -EEXIST;
             }
--

2.49.0

#3 lore raw
In reply to Jason Andryuk

xen/drivers/vpci/msix.c int vpci_make_msix_hole(const struct pci_dev *pdev) · line 669

Quoted 8 lines · Jason Andryuk
xen/drivers/vpci/msix.c +1 -1
@@ -666,7 +666,7 @@ int vpci_make_msix_hole(const struct pci_dev *pdev)
                 put_gfn(d, start);
                 gprintk(XENLOG_WARNING,
                         "%pp: existing mapping (mfn: %" PRI_mfn
-                        "type: %d) at %#lx clobbers MSIX MMIO area\n",
+                        " type: %d) at %#lx clobbers MSIX MMIO area\n",

Imo this is a good indication that the format string better wouldn't be extending across multiple lines. Then it would also be possible to grep for it (in the sources) using e.g. "existing mapping .* clobbers".

Jan

#4 lore raw
Quoted 13 lines · Jan Beulich

xen/drivers/vpci/msix.c int vpci_make_msix_hole(const struct pci_dev *pdev) · line 669

Quoted 8 lines · Jason Andryuk
xen/drivers/vpci/msix.c +1 -1
@@ -666,7 +666,7 @@ int vpci_make_msix_hole(const struct pci_dev *pdev)
                  put_gfn(d, start);
                  gprintk(XENLOG_WARNING,
                          "%pp: existing mapping (mfn: %" PRI_mfn
-                        "type: %d) at %#lx clobbers MSIX MMIO area\n",
+                        " type: %d) at %#lx clobbers MSIX MMIO area\n",

Imo this is a good indication that the format string better wouldn't be extending across multiple lines. Then it would also be possible to grep for it (in the sources) using e.g. "existing mapping .* clobbers".

Sure, a single line works for me.

Thanks,
Jason