From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: linuxppc-dev@lists.ozlabs.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH kernel] vfio: Only check for bus IOMMU when NOIOMMU is selected
Date: Fri, 22 Jan 2016 17:48:28 +1100 [thread overview]
Message-ID: <56A1D0BC.6030405@ozlabs.ru> (raw)
In-Reply-To: <1453444494-46900-1-git-send-email-aik@ozlabs.ru>
On 01/22/2016 05:34 PM, Alexey Kardashevskiy wrote:
> Recent change 03a76b60 "vfio: Include No-IOMMU mode" disabled VFIO
> on systems which do not implement iommu_ops for the PCI bus even though
> there is an VFIO IOMMU driver for it such as SPAPR TCE driver for
> PPC64/powernv platform.
>
> This moves iommu_present() call under #ifdef CONFIG_VFIO_NOIOMMU as
> it is done in the rest of the file to re-enable VFIO on powernv.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> drivers/vfio/vfio.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 82f25cc..3f8060e 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -343,7 +343,6 @@ static struct vfio_group *vfio_create_group(struct iommu_group *iommu_group,
> atomic_set(&group->opened, 0);
> group->iommu_group = iommu_group;
> group->noiommu = !iommu_present;
> -
Agrh. Unrelated change, repost?
> group->nb.notifier_call = vfio_iommu_group_notifier;
>
> /*
> @@ -767,7 +766,11 @@ int vfio_add_group_dev(struct device *dev,
>
> group = vfio_group_get_from_iommu(iommu_group);
> if (!group) {
> +#ifdef CONFIG_VFIO_NOIOMMU
> group = vfio_create_group(iommu_group, iommu_present(dev->bus));
> +#else
> + group = vfio_create_group(iommu_group, true);
> +#endif
> if (IS_ERR(group)) {
> iommu_group_put(iommu_group);
> return PTR_ERR(group);
>
--
Alexey
next prev parent reply other threads:[~2016-01-22 6:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 6:34 [PATCH kernel] vfio: Only check for bus IOMMU when NOIOMMU is selected Alexey Kardashevskiy
2016-01-22 6:48 ` Alexey Kardashevskiy [this message]
2016-01-22 17:24 ` Alex Williamson
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=56A1D0BC.6030405@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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).