Re: [PATCH 1/6] iommu: Add new iommu op to create domains owned by userspace

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

 



On 2023/9/26 13:28, Tian, Kevin wrote:
From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
Sent: Tuesday, September 19, 2023 5:25 PM

@@ -235,6 +235,13 @@ struct iommu_iotlb_gather {
   *           use. The information type is one of enum iommu_hw_info_type
defined
   *           in include/uapi/linux/iommufd.h.
   * @domain_alloc: allocate iommu domain

Given now we have two @alloc ops it'd be clearer to also update the
comment here so the explanation for @domain_alloc_user() is easier
to be understood, e.g.:

@domain_alloc: allocate and return an iommu domain if success. Otherwise
                NULL is returned. The domain is not fully initialized until
                the caller iommu_domain_alloc() returns.

+ * @domain_alloc_user: Allocate an iommu domain corresponding to the
input
+ *                     parameters like flags defined as enum
iommufd_ioas_map_flags
+ *                     in include/uapi/linux/iommufd.h. Different from the

"to the input parameters as defined in include/uapi/linux/iommufd.h".

+ *                     domain_alloc op, it requires iommu driver to fully
+ *                     initialize a new domain including the generic iommu_domain

"Unlike @domain_alloc, it is called only by iommufd and must fully initialize
the new domain before return".

*domain* here already refers to the generic iommu_domain struct.


above comment well received.

--
Regards,
Yi Liu



[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