[PATCH] vPCI: fix MSI-X PBA read/write gprintk()s

Jan Beulich posted 1 patch 2 years ago
Failed in applying to current master (apply log)
[PATCH] vPCI: fix MSI-X PBA read/write gprintk()s
Posted by Jan Beulich 2 years ago
%pp wants the address of an SBDF, not that of a PCI device.

Fixes: b4f211606011 ("vpci/msix: fix PBA accesses")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
I can't resist to say that this would not have happened if we hadn't
made this a %p extension, but e.g. a %o one as I had proposed.

--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -247,7 +247,7 @@ static int cf_check msix_read(
         {
             gprintk(XENLOG_WARNING,
                     "%pp: unable to map MSI-X PBA, report all pending\n",
-                    msix->pdev);
+                    &msix->pdev->sbdf);
             return X86EMUL_OKAY;
         }
 
@@ -332,7 +332,7 @@ static int cf_check msix_write(
             /* Unable to map the PBA, ignore write. */
             gprintk(XENLOG_WARNING,
                     "%pp: unable to map MSI-X PBA, write ignored\n",
-                    msix->pdev);
+                    &msix->pdev->sbdf);
             return X86EMUL_OKAY;
         }
Re: [PATCH] vPCI: fix MSI-X PBA read/write gprintk()s
Posted by Roger Pau Monné 2 years ago
On Thu, Apr 07, 2022 at 05:01:11PM +0200, Jan Beulich wrote:
> %pp wants the address of an SBDF, not that of a PCI device.
> 
> Fixes: b4f211606011 ("vpci/msix: fix PBA accesses")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks!