lkml.org 
[lkml]   [2023]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 03/10] iommufd: Create access in vfio_iommufd_emulated_bind()
On Thu, Feb 09, 2023 at 02:56:39AM +0000, Tian, Kevin wrote:
> External email: Use caution opening links or attachments
>
>
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Wednesday, February 8, 2023 5:18 AM
> >
> > @@ -141,10 +141,19 @@ static const struct iommufd_access_ops
> > vfio_user_ops = {
> > int vfio_iommufd_emulated_bind(struct vfio_device *vdev,
> > struct iommufd_ctx *ictx, u32 *out_device_id)
> > {
> > + struct iommufd_access *user;
> > +
> > lockdep_assert_held(&vdev->dev_set->lock);
> >
> > - vdev->iommufd_ictx = ictx;
> > iommufd_ctx_get(ictx);
> > + user = iommufd_access_create(vdev->iommufd_ictx, &vfio_user_ops,
> > vdev);
> > + if (IS_ERR(user)) {
> > + iommufd_ctx_put(vdev->iommufd_ictx);
> > + return PTR_ERR(user);
> > + }
> > + iommufd_access_set_ioas(user, 0);
>
> this is not required since ioas has been NULL after creation.

Will drop it.

> otherwise,
>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>

And add this too.

Thanks!
Nic

\
 
 \ /
  Last update: 2023-03-27 00:16    [W:0.121 / U:1.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site