[PATCH v4 5/7] iommu/io-pgtable-arm: Add read_and_clear_dirty() support
Jason Gunthorpe
jgg at nvidia.com
Sat Jun 1 14:17:01 PDT 2024
On Tue, May 28, 2024 at 08:18:29AM +0100, Shameer Kolothum wrote:
> .read_and_clear_dirty() IOMMU domain op takes care of reading the dirty
> bits (i.e. PTE has DBM set and AP[2] clear) and marshalling into a
> bitmap of a given page size.
>
> While reading the dirty bits we also set the PTE AP[2] bit to mark it
> as writeable-clean depending on read_and_clear_dirty() flags.
>
> PTE states with respect to DBM bit:
>
> DBM bit AP[2]("RDONLY" bit)
> 1. writable_clean 1 1
> 2. writable_dirty 1 0
> 3. read-only 0 1
>
> Reviewed-by: Ryan Roberts <ryan.roberts at arm.com>
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>
> ---
> drivers/iommu/io-pgtable-arm.c | 114 ++++++++++++++++++++++++++++++++-
> 1 file changed, 112 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the linux-arm-kernel
mailing list