RE: [PATCH v4 07/18] iommufd: Add IOMMU_HWPT_GET_DIRTY_IOVA

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

 



> From: Joao Martins <joao.m.martins@xxxxxxxxxx>
> Sent: Thursday, October 19, 2023 4:27 AM
> 
> Underneath it uses the IOMMU domain kernel API which will read the dirty
> bits, as well as atomically clearing the IOPTE dirty bit and flushing the
> IOTLB at the end. The IOVA bitmaps usage takes care of the iteration of the

what does 'atomically' try to convey here?

> +/**
> + * struct iommu_hwpt_get_dirty_iova -
> ioctl(IOMMU_HWPT_GET_DIRTY_IOVA)

IOMMU_HWPT_GET_DIRTY_BITMAP? IOVA usually means one address
but here we talk about a bitmap of which one bit represents a page.

> + * @size: sizeof(struct iommu_hwpt_get_dirty_iova)
> + * @hwpt_id: HW pagetable ID that represents the IOMMU domain.
> + * @flags: Flags to control dirty tracking status.
> + * @iova: base IOVA of the bitmap first bit
> + * @length: IOVA range size
> + * @page_size: page size granularity of each bit in the bitmap
> + * @data: bitmap where to set the dirty bits. The bitmap bits each
> + * represent a page_size which you deviate from an arbitrary iova.
> + * Checking a given IOVA is dirty:
> + *
> + *  data[(iova / page_size) / 64] & (1ULL << (iova % 64))

(1ULL << ((iova / page_size) % 64)

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