From: Julien Grall <julien.grall@arm.com>
To: Oleksandr Tyshchenko <olekstysh@gmail.com>,
xen-devel@lists.xenproject.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
sstabellini@kernel.org, volodymyr_babchuk@epam.com,
Jan Beulich <jbeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH V5 7/8] iommu/arm: Introduce iommu_add_dt_device API
Date: Tue, 24 Sep 2019 16:57:47 +0100 [thread overview]
Message-ID: <27781495-c097-f0a3-6c75-d8cb2aa6f523@arm.com> (raw)
In-Reply-To: <1569339027-19484-8-git-send-email-olekstysh@gmail.com>
Hi,
On 9/24/19 4:30 PM, Oleksandr Tyshchenko wrote:
> @@ -1263,15 +1264,22 @@ static int __init handle_device(struct domain *d, struct dt_device_node *dev,
> dt_dprintk("%s passthrough = %d nirq = %d naddr = %u\n",
> dt_node_full_name(dev), need_mapping, nirq, naddr);
>
> - if ( dt_device_is_protected(dev) && need_mapping )
> + if ( need_mapping )
> {
> - dt_dprintk("%s setup iommu\n", dt_node_full_name(dev));
> - res = iommu_assign_dt_device(d, dev);
> - if ( res )
> - {
> - printk(XENLOG_ERR "Failed to setup the IOMMU for %s\n",
> + dt_dprintk("Check if %s is behind the IOMMU and add it\n",
> dt_node_full_name(dev));
> - return res;
> +
> + iommu_add_dt_device(dev);
Return value should always be checked or explain why this is not done.
[...]
> int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d,
> XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
> {
> @@ -177,6 +241,13 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d,
> break;
> }
>
> + iommu_add_dt_device(dev);
Same here.
> + if ( !dt_device_is_protected(dev) )
> + {
> + ret = -EINVAL;
> + break;
> + }
This is already checked in iommu_assign_dt_device().
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-09-24 15:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 15:30 [Xen-devel] [PATCH V5 0/8] iommu/arm: Add Renesas IPMMU-VMSA support + Linux's iommu_fwspec Oleksandr Tyshchenko
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 1/8] iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff Oleksandr Tyshchenko
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 2/8] iommu/arm: Add ability to handle deferred probing request Oleksandr Tyshchenko
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 3/8] xen/common: Introduce _xrealloc function Oleksandr Tyshchenko
2019-09-24 15:51 ` Jan Beulich
2019-09-24 17:14 ` Oleksandr
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 4/8] xen/common: Introduce xrealloc_flex_struct() helper macros Oleksandr Tyshchenko
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 5/8] iommu/arm: Add lightweight iommu_fwspec support Oleksandr Tyshchenko
2019-09-24 15:42 ` Julien Grall
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 6/8] iommu: Order the headers alphabetically in device_tree.c Oleksandr Tyshchenko
2019-09-24 15:43 ` Julien Grall
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 7/8] iommu/arm: Introduce iommu_add_dt_device API Oleksandr Tyshchenko
2019-09-24 15:57 ` Julien Grall [this message]
2019-09-24 16:22 ` Oleksandr
2019-09-24 17:21 ` Julien Grall
2019-09-24 17:30 ` Oleksandr
2019-09-24 15:30 ` [Xen-devel] [PATCH V5 8/8] iommu/arm: Add Renesas IPMMU-VMSA support Oleksandr Tyshchenko
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=27781495-c097-f0a3-6c75-d8cb2aa6f523@arm.com \
--to=julien.grall@arm.com \
--cc=jbeulich@suse.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=olekstysh@gmail.com \
--cc=sstabellini@kernel.org \
--cc=volodymyr_babchuk@epam.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.