From: Jason Gunthorpe <jgg@nvidia.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
kvm@vger.kernel.org, Yi Liu <yi.l.liu@intel.com>
Subject: Re: [PATCH] vfio: Support VFIO_NOIOMMU with iommufd
Date: Mon, 9 Jan 2023 20:29:40 -0400 [thread overview]
Message-ID: <Y7yxdCleyk3wpRm5@nvidia.com> (raw)
In-Reply-To: <20230109163434.6311b4a6.alex.williamson@redhat.com>
On Mon, Jan 09, 2023 at 04:34:34PM -0700, Alex Williamson wrote:
> On Mon, 9 Jan 2023 10:22:59 -0400
> Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> > Add a small amount of emulation to vfio_compat to accept the SET_IOMMU
> > to VFIO_NOIOMMU_IOMMU and have vfio just ignore iommufd if it is working
> > on a no-iommu enabled device.
> >
> > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> > ---
> > drivers/iommu/iommufd/Kconfig | 2 +-
> > drivers/iommu/iommufd/vfio_compat.c | 46 ++++++++++++++++++++++++-----
> > drivers/vfio/group.c | 13 ++++----
> > drivers/vfio/iommufd.c | 21 ++++++++++++-
> > include/linux/iommufd.h | 6 ++--
> > 5 files changed, 70 insertions(+), 18 deletions(-)
> >
> > This needs a testing confirmation with dpdk to go forward, thanks
>
> How do we create a noiommu group w/o the vfio_noiommu flag that's
> provided by container.c?
Ah, the module option is now in the wrong place, I'll move it to
vfio_main.c
> Even without dpdk, you should be able to turn off the system IOMMU
> and get something bound to vfio-pci that still taints the kernel and
> provides a noiommu-%d group under /dev/vfio/. There's a rudimentary
> unit test for noiommu here[1]. Thanks,
Thanks, I'll check it
Jason
next prev parent reply other threads:[~2023-01-10 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 14:22 [PATCH] vfio: Support VFIO_NOIOMMU with iommufd Jason Gunthorpe
2023-01-09 23:34 ` Alex Williamson
2023-01-10 0:29 ` Jason Gunthorpe [this message]
2023-01-10 6:20 ` Tian, Kevin
2023-01-10 18:02 ` Jason Gunthorpe
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=Y7yxdCleyk3wpRm5@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=yi.l.liu@intel.com \
/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