From: Jan Beulich <jbeulich@suse.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH 4/6] make passthrough/pci.c:deassign_device() static
Date: Tue, 6 Aug 2019 17:54:10 +0200 [thread overview]
Message-ID: <b604bbcc-4476-9a3d-26fc-84303661c235@suse.com> (raw)
In-Reply-To: <20190730134419.2739-5-paul.durrant@citrix.com>
On 30.07.2019 15:44, Paul Durrant wrote:
> This function is only ever called from within the same source module and
> really has no business being declared xen/iommu.h. This patch relocates
> the function ahead of the first called and makes it static.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
But of course it would have been nice if some minimal and obvious
style corrections were done at the same time:
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -889,6 +889,52 @@ static int pci_clean_dpci_irqs(struct domain *d)
> return 0;
> }
>
> +/* caller should hold the pcidevs_lock */
> +static int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
uint<N>_t
> +{
> + const struct domain_iommu *hd = dom_iommu(d);
> + struct pci_dev *pdev = NULL;
stray initializer
> + int ret = 0;
> +
> + if ( !is_iommu_enabled(d) )
> + return -EINVAL;
> +
> + ASSERT(pcidevs_locked());
> + pdev = pci_get_pdev_by_domain(d, seg, bus, devfn);
> + if ( !pdev )
> + return -ENODEV;
> +
> + while ( pdev->phantom_stride )
> + {
> + devfn += pdev->phantom_stride;
> + if ( PCI_SLOT(devfn) != PCI_SLOT(pdev->devfn) )
> + break;
> + ret = hd->platform_ops->reassign_device(d, hardware_domain, devfn,
> + pci_to_dev(pdev));
> + if ( !ret )
> + continue;
> +
> + printk(XENLOG_G_ERR "d%d: deassign %04x:%02x:%02x.%u failed (%d)\n",
> + d->domain_id, seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), ret);
(less "minimal") use %pd (also once more below)
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-06 15:54 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 13:44 [Xen-devel] [PATCH 0/6] per-domain IOMMU control Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 1/6] domain: introduce XEN_DOMCTL_CDF_iommu Paul Durrant
2019-08-07 9:21 ` Jan Beulich
2019-08-12 12:22 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 2/6] use is_iommu_enabled() where appropriate Paul Durrant
2019-08-07 9:55 ` Jan Beulich
2019-08-07 10:22 ` Julien Grall
2019-08-12 14:53 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-08-01 8:05 ` Alexandru Stefan ISAILA
2019-08-07 10:31 ` Jan Beulich
2019-08-12 15:41 ` Paul Durrant
2019-08-12 16:26 ` Paul Durrant
2019-08-14 9:39 ` Paul Durrant
2019-08-27 7:48 ` Jan Beulich
2019-08-29 9:33 ` Paul Durrant
2019-08-29 9:52 ` Jan Beulich
2019-08-29 10:20 ` Paul Durrant
2019-08-29 10:33 ` Jan Beulich
2019-08-27 7:47 ` Jan Beulich
2019-08-27 7:45 ` Jan Beulich
2019-08-29 9:28 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 4/6] make passthrough/pci.c:deassign_device() static Paul Durrant
2019-08-06 15:54 ` Jan Beulich [this message]
2019-08-14 9:42 ` Paul Durrant
2019-07-30 13:44 ` [Xen-devel] [PATCH 5/6] iommu: tidy up iommu_us_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-08-07 10:41 ` Jan Beulich
2019-08-14 10:13 ` Paul Durrant
2019-08-14 10:20 ` Julien Grall
2019-08-14 10:27 ` Paul Durrant
2019-08-14 10:44 ` Julien Grall
2019-08-14 11:11 ` Paul Durrant
2019-08-14 12:28 ` Julien Grall
2019-08-14 12:35 ` Paul Durrant
2019-08-27 7:53 ` Jan Beulich
2019-07-30 13:44 ` [Xen-devel] [PATCH 6/6] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-08-07 12:12 ` Jan Beulich
2019-08-14 10:40 ` Paul Durrant
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=b604bbcc-4476-9a3d-26fc-84303661c235@suse.com \
--to=jbeulich@suse.com \
--cc=paul.durrant@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).