All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Oleksandr Andrushchenko" <andr2000@gmail.com>
Cc: xen-devel@lists.xenproject.org,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: Re: [PATCH 2/2] vpci: use named rangeset for BARs
Date: Mon, 22 Nov 2021 11:43:38 +0100	[thread overview]
Message-ID: <f1aaedc6-73c5-e4ac-91c1-323f44d83687@suse.com> (raw)
In-Reply-To: <YZtwj0OKrNaZ7s5X@Air-de-Roger>

On 22.11.2021 11:27, Roger Pau Monné wrote:
> On Mon, Nov 22, 2021 at 11:28:25AM +0200, Oleksandr Andrushchenko wrote:
>> --- 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);
> 
> You are still not adding the rangeset to the domain list, as the first
> parameter passed here in NULL instead of a domain struct.
> 
> Given the current short living of the rangesets I'm not sure it makes
> much sense to link them to the domain ATM, but I guess this is kind of
> a preparatory change as other patches you have will have the
> rangesets permanent as long as the device is assigned to a domain.
> 
> Likely the above reasoning (or the appropriate one) should be added to
> the commit message.

Or, as also suggested as an option, them getting accounted to the domain
could be folded into the patch making them long-lived.

Jan



  reply	other threads:[~2021-11-22 10:44 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 ` [PATCH 2/2] vpci: use named rangeset for BARs Oleksandr Andrushchenko
2021-11-22 10:27   ` Roger Pau Monné
2021-11-22 10:43     ` Jan Beulich [this message]
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=f1aaedc6-73c5-e4ac-91c1-323f44d83687@suse.com \
    --to=jbeulich@suse.com \
    --cc=andr2000@gmail.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.