Re: [PATCH v4 04/18] iommu: Add iommu_domain ops for dirty tracking

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

 




On 20/10/2023 06:54, Tian, Kevin wrote:
>> From: Joao Martins <joao.m.martins@xxxxxxxxxx>
>> Sent: Thursday, October 19, 2023 4:27 AM
>>
>> Add to iommu domain operations a set of callbacks to perform dirty
>> tracking, particulary to start and stop tracking and to read and clear the
>> dirty data.
>>
>> Drivers are generally expected to dynamically change its translation
>> structures to toggle the tracking and flush some form of control state
>> structure that stands in the IOVA translation path. Though it's not
>> mandatory, as drivers can also enable dirty tracking at boot, and just
>> clear the dirty bits before setting dirty tracking. For each of the newly
>> added IOMMU core APIs:
>>
>> iommu_cap::IOMMU_CAP_DIRTY: new device iommu_capable value when
>> probing for
>> capabilities of the device.
> 
> IOMMU_CAP_DIRTY_TRACKING is more readable.
> 
OK

>> @@ -671,6 +724,9 @@ struct iommu_fwspec {
>>  /* ATS is supported */
>>  #define IOMMU_FWSPEC_PCI_RC_ATS			(1 << 0)
>>
>> +/* Read but do not clear any dirty bits */
>> +#define IOMMU_DIRTY_NO_CLEAR			(1 << 0)
>> +
> 
> better move to the place where iommu_dirty_ops is defined.
> 
OK

> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>



[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