[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 <andr2000@xxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Mon, 22 Nov 2021 11:27:27 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=m/nvepAPp3RFIc7BRcUmfMMFIXAJf2aJx2Hgjj3ljZk=; b=h5WOMkY+YlQXphAXT4cthEdWAsCDTDRpX1pwZ/IEZTNgjfiKMbru+XZQL5jJS+EJfCMNGkDyeUxNiGw/5mmvuqKIW11KPBWXRsv7yJm4NFhSCvuDEhlfosWuAtEu5GLC/1oMNthXgnmXkqRKNDUdqagOQ8LahfwhMT99AwCJbt7bCDSsb0BomeQjjfzNykUP9p/qwJbieBYbNkxqiczIA1AE8hRbJTn/YqpV/IAAiyV5O92w4nyz+QjgLwPaL+Kw6tFyEJBbXJ7XUKtgG+uCBb+CSVWdy5PfUVz8qu2euGZsyr6WPoUUfUrshGHYfg19ho66Xlb7OEs8U1JxeObkkQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A2AaT/iAhPgRygMEAMyoR5PsfMWldD+0yBlloUUsD82B63JNZUeftbwU9ey4Bsgmh3sXoClIQApPDcGOsp3pD8GMuMDoLMFsW/xlg9/RIr9OQZjRMY0qhikJ7bekgZidSbeJvr1apbKE+IDPdpWCkKBaMx2yEDpPpMvonwKqBEPRC5mQeMCbGppGvcSfNtj6MPpXBNsF2OcRuK3KDtT5iRZpUKDLBeShR3pTqa42Z70MllhpsKgNiLV7jxSoztVKujgHMZm6RZiM3cDQygcg5JFNZpbcLQw1vhkgSXLlbsuxKA8BBfwGEPeQe41ChbMNFinC8bho+gcnyDpv/krirw==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <jbeulich@xxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
- Delivery-date: Mon, 22 Nov 2021 10:28:03 +0000
- Ironport-data: A9a23:ZroW4a6yql5TAjS5BNpbHAxRtMTAchMFZxGqfqrLsTDasY5as4F+v jZKCzyBPvzbYTOhe95/O4Xj9R9Q68CHzoVgHgJl/Ck0Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuV3zyIQUBUjclkfJKlYAL/En03FVAMpBsJ00o5wrdg2NQw2LBVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z9 9xS6byIWAkQN+6VlrVDDzB0GCNDBPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALNs7kMZlZonh95TrYEewnUdbIRKCiCdpwgWdr2J4WRay2i 8wxcBl+TRiYYDB1KFoQLoIhnLir22nxSmgNwL6SjfVuuDWCpOBr65DvOtfIft2BRe1Og12V4 GnB+gzRBRUXN8eWzzafxXuqivXShiPwWI8UF7qQ++ZjhRuYwWl7IBQQWUHh+aHhokG7UtNbb UcT/0IGvaU0sUCmUNT5dxm5u2Kf+A4RXcJKFO834x3LzbDbizt1HUBdEGQHMoZ/8pZrG3p6j Tdlgu8FGxRQuaLJaUqM+I6d7mq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sDY5pau854ud3ATV0gJ1XYHNu/xKDwReOApP+tcKH LKjfA32wZINE5nJfiTNz0gZazuttfLnJXpbVovAAMm0hCHiXeN5KThGxaV8x8CW3cXqI1SvF Ttokjc3OGOovu7whjT2yv66IlXosLozp9mCNaXgsYYBz3wgkKDZZhnWZeFoDcpydvfomoCoZ 3pmVMNLs5z43TeciWcpgbs4RDp1HIU53rr2Taj8A3eiP28YAh/J9tKhIpffBecwVEnpstA3K VC2H/cn4ZLDDvb9R6NqeTgZlVPrA6ZsHAimekcgzh0So0FcoJcqoQZ4Qd8DIoAJiTn84oqed MeQ/003MwmMW9yUkqp/VWGmLeXLzYO91a9MwQ/U/WuonlrdCsT9Tpc+CQd9k1wg67VBaM0o9 gsCZ4Y542mePVmGZ6VNN1xMfdfNVa9My4kEFjiaGgPR5t3c04klfbMkcAIDaeRCds18Kc=
- Ironport-sdr: snnKygqEmvtwD13lLsoaKOWQdRFMFm0mUxIW0+6fzcK8LagEInbEYKvcAAaatNE59G2Ld0C5Xr QZR+7mqnKqkzTkSTnj0LmAlvjctdFvo9yLxuWr9CM2TuU4+be9n9BDfevpmW8pmuN/KOqG9iC4 HKX7mer/+KOk+eCODFTBUdVh9CbncKsfaDYWKfENz6gLhXSDFPHFakCaYVx+AV38NQipcqr3WQ q+eQU+ajq+SXugZPHLtqAWqVm/gukKujkCsDKOFhgcA++fziYZYqnWojG7iq6HnMhHF2N6HXoZ 4VtQ/T6ySedjr3ju2DRdAPUq
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 22, 2021 at 11:28:25AM +0200, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>
> 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@xxxxxxxx>
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> ---
> 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);
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.
Thanks, Roger.
|