Re: semantics of VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP
From: Alex Williamson
Date: Tue Jun 01 2021 - 10:14:31 EST
On Tue, 1 Jun 2021 13:48:22 +0000
Thanos Makatos <thanos.makatos@xxxxxxxxxxx> wrote:
> (sending here as I can't find a relevant list in
> http://vger.kernel.org/vger-lists.html)
$ ./scripts/get_maintainer.pl include/uapi/linux/vfio.h
Alex Williamson <alex.williamson@xxxxxxxxxx> (maintainer:VFIO DRIVER)
Cornelia Huck <cohuck@xxxxxxxxxx> (reviewer:VFIO DRIVER)
kvm@xxxxxxxxxxxxxxx (open list:VFIO DRIVER)
linux-kernel@xxxxxxxxxxxxxxx (open list)
> I'm trying to understand the semantics of
> VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP. My (very rough) understanding
> so far is that once a page gets pinned then it's considered dirty and
> if the page is still pinned then it remains dirty even after we're
> done serving VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP. Is my
> understanding correct?
This is the current type1 implementation, but the semantics only
require that a page is reported dirty if it's actually been written.
Without support for tracking DMA writes, we assume that any page
accessible to the device is constantly dirty. This will be refined
over time as software and hardware support improves, but we currently
error on the side of assuming all pinned pages are always dirty.
Thanks,
Alex