[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB527662B3BCB562D4E0969C878CD99@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Thu, 9 Feb 2023 02:56:39 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Nicolin Chen <nicolinc@...dia.com>,
"jgg@...dia.com" <jgg@...dia.com>,
"joro@...tes.org" <joro@...tes.org>,
"will@...nel.org" <will@...nel.org>,
"robin.murphy@....com" <robin.murphy@....com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"shuah@...nel.org" <shuah@...nel.org>
CC: "Liu, Yi L" <yi.l.liu@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>
Subject: RE: [PATCH v2 03/10] iommufd: Create access in
vfio_iommufd_emulated_bind()
> From: Nicolin Chen <nicolinc@...dia.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.
otherwise,
Reviewed-by: Kevin Tian <kevin.tian@...el.com>
Powered by blists - more mailing lists