Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iommupt/x86: Set the dirty bit only for writable PTEs

AMD and VTD are historically different here, adopt the VTD version of
setting the D bit only on writable PTEs as it makes more sense.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

authored by

Jason Gunthorpe and committed by
Joerg Roedel
1978fac2 5448c155

+2 -2
+2 -2
drivers/iommu/generic_pt/fmt/x86_64.h
··· 192 192 { 193 193 u64 pte; 194 194 195 - pte = X86_64_FMT_U | X86_64_FMT_A | X86_64_FMT_D; 195 + pte = X86_64_FMT_U | X86_64_FMT_A; 196 196 if (iommu_prot & IOMMU_WRITE) 197 - pte |= X86_64_FMT_RW; 197 + pte |= X86_64_FMT_RW | X86_64_FMT_D; 198 198 199 199 /* 200 200 * Ideally we'd have an IOMMU_ENCRYPTED flag set by higher levels to