All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Juergen Gross <jgross@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: [Xen-devel] [PATCH for-4.13] xen/passthrough: Render domains with %pd in the 'Q' debug handler
Date: Wed, 13 Nov 2019 13:44:17 +0000	[thread overview]
Message-ID: <20191113134417.17299-1-andrew.cooper3@citrix.com> (raw)

IOMMUs are owned by DOM_XEN, and with XSA-302, DOM_IO is used for
quarantined domains.  Use %pd in the printk to render the system
domains more intelligently.

Before:
  (XEN) 0000:00:01.0 - dom 0   - node 0   - MSIs < >
  (XEN) 0000:00:00.0 - dom 0   - node 0   - MSIs < >
  (XEN) 0000:80:00.2 - dom 32754 - node 1   - MSIs < >
  (XEN) 0000:a0:00.2 - dom 32754 - node 1   - MSIs < >
  (XEN) 0000:c0:00.2 - dom 32754 - node 1   - MSIs < >
  (XEN) 0000:e0:00.2 - dom 32754 - node 1   - MSIs < >
  (XEN) 0000:00:00.2 - dom 32754 - node 0   - MSIs < >
  (XEN) 0000:20:00.2 - dom 32754 - node 0   - MSIs < >
  (XEN) 0000:40:00.2 - dom 32754 - node 0   - MSIs < >
  (XEN) 0000:60:00.2 - dom 32754 - node 0   - MSIs < >

After:
  (XEN) 0000:00:01.0 - d0 - node 0   - MSIs < >
  (XEN) 0000:00:00.0 - d0 - node 0   - MSIs < >
  (XEN) 0000:80:00.2 - d[XEN] - node 1   - MSIs < >
  (XEN) 0000:a0:00.2 - d[XEN] - node 1   - MSIs < >
  (XEN) 0000:c0:00.2 - d[XEN] - node 1   - MSIs < >
  (XEN) 0000:e0:00.2 - d[XEN] - node 1   - MSIs < >
  (XEN) 0000:00:00.2 - d[XEN] - node 0   - MSIs < >
  (XEN) 0000:20:00.2 - d[XEN] - node 0   - MSIs < >
  (XEN) 0000:40:00.2 - d[XEN] - node 0   - MSIs < >
  (XEN) 0000:60:00.2 - d[XEN] - node 0   - MSIs < >

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Juergen Gross <jgross@suse.com>

4.13 nice-to-have.  Not strictly required, but it is a low risk change which
improves diagnostics.
---
 xen/drivers/passthrough/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 18a7dc7224..8e501a79a8 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1349,10 +1349,9 @@ static int _dump_pci_devices(struct pci_seg *pseg, void *arg)
 
     list_for_each_entry ( pdev, &pseg->alldevs_list, alldevs_list )
     {
-        printk("%04x:%02x:%02x.%u - dom %-3d - node %-3d - MSIs < ",
+        printk("%04x:%02x:%02x.%u - %pd - node %-3d - MSIs < ",
                pseg->nr, pdev->bus,
-               PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
-               pdev->domain ? pdev->domain->domain_id : -1,
+               PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), pdev->domain,
                (pdev->node != NUMA_NO_NODE) ? pdev->node : -1);
         list_for_each_entry ( msi, &pdev->msi_list, list )
                printk("%d ", msi->irq);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-11-13 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 13:44 Andrew Cooper [this message]
2019-11-13 14:28 ` [Xen-devel] [PATCH for-4.13] xen/passthrough: Render domains with %pd in the 'Q' debug handler Jan Beulich
2019-11-13 14:31 ` Jürgen Groß

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=20191113134417.17299-1-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.