mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
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>
This commit is contained in:
committed by
Joerg Roedel
parent
5448c1558f
commit
1978fac281
@@ -192,9 +192,9 @@ static inline int x86_64_pt_iommu_set_prot(struct pt_common *common,
|
||||
{
|
||||
u64 pte;
|
||||
|
||||
pte = X86_64_FMT_U | X86_64_FMT_A | X86_64_FMT_D;
|
||||
pte = X86_64_FMT_U | X86_64_FMT_A;
|
||||
if (iommu_prot & IOMMU_WRITE)
|
||||
pte |= X86_64_FMT_RW;
|
||||
pte |= X86_64_FMT_RW | X86_64_FMT_D;
|
||||
|
||||
/*
|
||||
* Ideally we'd have an IOMMU_ENCRYPTED flag set by higher levels to
|
||||
|
||||
Reference in New Issue
Block a user