Re: [PATCH v3 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 21, 2024 at 07:11:47PM +1100, Alexey Kardashevskiy wrote:
> > +     /*
> > +      * A real physical IOMMU instance would unlikely get unplugged, so the
> > +      * life cycle of this iommu_dev is guaranteed to stay alive, mostly. A
> > +      * pluggable IOMMU instance (if exists) is responsible for refcounting
> > +      * on its own.
> 
> "Assume IOMMUs are unpluggable (the most likely case)" would do imho,
> all these "unlikely" and "mostly" and "if exists" confuse.

Done.

-----------------------------------------------------------------
@@ -63,13 +63,7 @@ int iommufd_viommu_alloc_ioctl(struct iommufd_ucmd *ucmd)
        viommu->type = cmd->type;
        viommu->ictx = ucmd->ictx;
        viommu->hwpt = hwpt_paging;
-
-       /*
-        * A real physical IOMMU instance would unlikely get unplugged, so the
-        * life cycle of this iommu_dev is guaranteed to stay alive, mostly. A
-        * pluggable IOMMU instance (if exists) is responsible for refcounting
-        * on its own.
-        */
+       /* Assume physical IOMMUs are unpluggable (the most likely case) */
        viommu->iommu_dev = __iommu_get_iommu_dev(idev->dev);

        refcount_inc(&viommu->hwpt->common.obj.users);
-----------------------------------------------------------------

Thanks
Nicolin




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux