[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211029124452.GW2744544@nvidia.com>
Date: Fri, 29 Oct 2021 09:44:52 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: David Gibson <david@...son.dropbear.id.au>
Cc: Liu Yi L <yi.l.liu@...el.com>, alex.williamson@...hat.com,
hch@....de, jasowang@...hat.com, joro@...tes.org,
jean-philippe@...aro.org, kevin.tian@...el.com, parav@...lanox.com,
lkml@...ux.net, pbonzini@...hat.com, lushenming@...wei.com,
eric.auger@...hat.com, corbet@....net, ashok.raj@...el.com,
yi.l.liu@...ux.intel.com, jun.j.tian@...el.com, hao.wu@...el.com,
dave.jiang@...el.com, jacob.jun.pan@...ux.intel.com,
kwankhede@...dia.com, robin.murphy@....com, kvm@...r.kernel.org,
iommu@...ts.linux-foundation.org, dwmw2@...radead.org,
linux-kernel@...r.kernel.org, baolu.lu@...ux.intel.com,
nicolinc@...dia.com
Subject: Re: [RFC 20/20] Doc: Add documentation for /dev/iommu
On Fri, Oct 29, 2021 at 11:15:31AM +1100, David Gibson wrote:
> > +Device must be bound to an iommufd before the attach operation can
> > +be conducted. The binding operation builds the connection between
> > +the devicefd (opened via device-passthrough framework) and IOMMUFD.
> > +IOMMU-protected security context is esbliashed when the binding
> > +operation is completed.
>
> This can't be quite right. You can't establish a safe security
> context until all devices in the groun are bound, but you can only
> bind them one at a time.
When any device is bound the entire group is implicitly adopted to
this iommufd and the whole group enters a safe-for-userspace state.
It is symmetrical with the kernel side which is also device focused,
when any struct device is bound to a kernel driver the entire group is
implicitly adopted to kernel mode.
Lu should send a patch series soon that harmonize how this works, it
is a very nice cleanup.
Jason
Powered by blists - more mailing lists