[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] vpci: use named rangeset for BARs


  • To: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 Nov 2021 11:54:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FnMc43omA2wJL5UaZtt2TJn3nJlsQwK/5Y8hRVd6rjU=; b=lMG+yVF8lLTTq0wOKW9Gtg8plACXQuI4h9DrL8aA5LpSeetNykT9KnPD/iGaczVU36VSNOqNmXKP52WkXorU76LVzMKhoCkZoBO5ladmC7d/mIQP5EcpNcOgRQguvT+V0gDx99AJvN67/0O4kWO9r5wvjYTp9EQYuALxBkkXbI3uiYQGBfajd+m6CDlKz/4tuBYbWT2gIz4Qj08uRsSsIvI+d5jGr31370LdmzPIUYYBuQ4eMq4Iqdwa52xwuZToO3NQtKTc+uCkbB1+N5UG2OpLZBt+eI81ZcgAgQp1CEbOJUhELyho45twP+2GVihC4OVKFdPvtIdqFjhJNJ3svQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oD9ZXKlP6jnMiOM/s8FTWTX4plzKIMxi27f2WWJit6iXpVxvJMrDw6CS3bOMu20Wkf8YSs0aN4GQev78lg8EsneRUlMrxcLZNAsxKCX3MEnM99D8tbPYeiCJ1duuJli4VL9brdCIScxnUj1JKMuSX+/trH3FtlaOPbok04H18Tb/7YRsmYU1wvDq9o8yJrc9HRH3gkcc/izRMytaM27xqhyx7dK6sbB1NtYM5NaqWSJoKwr2yI7RFqF6e6Ko33MwzE/qEEpE4CcgjMXqGh6TwdRtbo06RS8jARDnWMukft41QX+x1z+MaN0Yff+bqgE9shK9ov6eozp0cNbyePg1PA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 22 Nov 2021 10:54:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.11.2021 11:50, Oleksandr Andrushchenko wrote:
> 
> 
> On 22.11.21 12:43, Jan Beulich wrote:
>> 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.
> If I fold then there is no reason to add the comment, right?

I'd say you still want to justify the change from "anonymous" to "named and
accounted".

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.