Re: [PATCH v4 06/18] iommufd: Add IOMMU_HWPT_SET_DIRTY

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

 



On 18/10/2023 21:27, Joao Martins wrote:
> +
> +/*
> + * enum iommufd_set_dirty_flags - Flags for steering dirty tracking
> + * @IOMMU_DIRTY_TRACKING_ENABLE: Enables dirty tracking
> + */
> +enum iommufd_hwpt_set_dirty_flags {
> +	IOMMU_DIRTY_TRACKING_ENABLE = 1,
> +};
> +
> +/**
> + * struct iommu_hwpt_set_dirty - ioctl(IOMMU_HWPT_SET_DIRTY)
> + * @size: sizeof(struct iommu_hwpt_set_dirty)
> + * @flags: Flags to control dirty tracking status.
> + * @hwpt_id: HW pagetable ID that represents the IOMMU domain.
> + *
> + * Toggle dirty tracking on an HW pagetable.
> + */
> +struct iommu_hwpt_set_dirty {
> +	__u32 size;
> +	__u32 flags;
> +	__u32 hwpt_id;
> +	__u32 __reserved;
> +};
> +#define IOMMU_HWPT_SET_DIRTY _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_SET_DIRTY)
>  #endif

Notice a docs inconsistency with the docs compared to other ioctls which pass
flags. So applying the snippet below to this patch. Will be doing similar thing
to GET_DIRTY_BITMAP patch, except that the GET_DIRTY_BITMAP patch says "Must be
zero", and then change into a similar comment as below when I introduce the
NO_CLEAR flag.

 /**
  * struct iommu_hwpt_set_dirty_tracking - ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING)
  * @size: sizeof(struct iommu_hwpt_set_dirty_tracking)
- * @flags: Flags to control dirty tracking status.
+ * @flags: Combination of enum iommufd_hwpt_set_dirty_tracking_flags
  * @hwpt_id: HW pagetable ID that represents the IOMMU domain.
  *
  * Toggle dirty tracking on an HW pagetable.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux