On 23/07/2024 15:23, Yi Liu wrote: > On 2024/7/23 05:13, Joao Martins wrote: >> This small series adds support for IOMMU dirty tracking support via the >> IOMMUFD backend. The hardware capability is available on most recent x86 >> hardware (and these SMMUv3 in upcoming v6.11). The series is divided >> organized as follows: >> >> * Patches 1 - 7: IOMMUFD backend support for dirty tracking; >> >> Introduce auto domains -- Patch 3 goes into more detail, but the gist is that >> we will find and attach a device to a compatible IOMMU domain, or allocate a >> new >> hardware pagetable *or* rely on kernel IOAS attach (for mdevs). Afterwards >> the >> workflow is relatively simple: >> >> 1) Probe device and allow dirty tracking in the HWPT >> 2) Toggling dirty tracking on/off >> 3) Read-and-clear of Dirty IOVAs >> >> The heuristics selected for (1) were to always request the HWPT for >> dirty tracking if supported, or rely on device dirty page tracking. This >> is a little simplistic and we aren't necessarily utilizing IOMMU dirty >> tracking even if we ask during hwpt allocation. >> >> The unmap case is deferred until further vIOMMU support with migration >> is added[3] which will then introduce the usage of >> IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR in GET_DIRTY_BITMAP ioctl in the >> dma unmap bitmap flow. >> >> * Patches 8 - 9: Don't block live migration where there's no VF dirty >> tracker, considering that we have IOMMU dirty tracking. >> >> Comments and feedback appreciated (on patches 1, 5, 8, 9) > > Hi Joao, > > Do you have a github branch for this version? :) >
No, but you can probably use Cedric's vfio-next branch: https://github.com/legoater/qemu/tree/vfio-next ... Given that he has just submitted his PR with this series. Joao