All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: roger.pau@citrix.com, jbeulich@suse.com,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: [PATCH 2/2] vpci: use named rangeset for BARs
Date: Mon, 22 Nov 2021 11:28:25 +0200	[thread overview]
Message-ID: <20211122092825.2502306-2-andr2000@gmail.com> (raw)
In-Reply-To: <20211122092825.2502306-1-andr2000@gmail.com>

From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Use a named range set instead of an anonymous one, but do not print it
while dumping range sets for a domain.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 xen/drivers/vpci/header.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
index 40ff79c33f8f..82a3e50d6053 100644
--- a/xen/drivers/vpci/header.c
+++ b/xen/drivers/vpci/header.c
@@ -206,12 +206,16 @@ static void defer_map(struct domain *d, struct pci_dev *pdev,
 static int modify_bars(const struct pci_dev *pdev, uint16_t cmd, bool rom_only)
 {
     struct vpci_header *header = &pdev->vpci->header;
-    struct rangeset *mem = rangeset_new(NULL, NULL, 0);
+    struct rangeset *mem;
+    char str[32];
     struct pci_dev *tmp, *dev = NULL;
     const struct vpci_msix *msix = pdev->vpci->msix;
     unsigned int i;
     int rc;
 
+    snprintf(str, sizeof(str), "%pp", &pdev->sbdf);
+    mem = rangeset_new(NULL, str, RANGESETF_no_print);
+
     if ( !mem )
         return -ENOMEM;
 
-- 
2.25.1



  reply	other threads:[~2021-11-22  9:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22  9:28 [PATCH 1/2] rangeset: add RANGESETF_no_print flag Oleksandr Andrushchenko
2021-11-22  9:28 ` Oleksandr Andrushchenko [this message]
2021-11-22 10:27   ` [PATCH 2/2] vpci: use named rangeset for BARs Roger Pau Monné
2021-11-22 10:43     ` Jan Beulich
2021-11-22 10:50       ` Oleksandr Andrushchenko
2021-11-22 10:53         ` Roger Pau Monné
2021-11-22 10:54         ` Jan Beulich
2021-11-22 10:59           ` Oleksandr Andrushchenko
2021-11-22 11:08             ` Jan Beulich
2021-11-22 11:14               ` Oleksandr Andrushchenko
2021-11-22 11:27 ` [PATCH 1/2] rangeset: add RANGESETF_no_print flag Oleksandr Andrushchenko
2021-11-23  7:38 ` Jan Beulich
2021-11-23  7:49   ` Oleksandr Andrushchenko
2021-11-23  8:01     ` Jan Beulich
2021-11-23  8:04       ` Oleksandr Andrushchenko

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=20211122092825.2502306-2-andr2000@gmail.com \
    --to=andr2000@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=roger.pau@citrix.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.