iommu/vt-d: Preset Access/Dirty bits for IOVA over FL
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 15 Jan 2021 00:42:02 +0000 (08:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:33 +0000 (09:50 +0200)
commit416fa531c8160151090206a51b829b9218b804d9
tree69c31e5fd0cd63a1d2bf6cd58013bb2b88bde13e
parent32737c3a2669f95ec46e8711f866e050ac2b6be3
iommu/vt-d: Preset Access/Dirty bits for IOVA over FL

[ Upstream commit a8ce9ebbecdfda3322bbcece6b3b25888217f8e3 ]

The Access/Dirty bits in the first level page table entry will be set
whenever a page table entry was used for address translation or write
permission was successfully translated. This is always true when using
the first-level page table for kernel IOVA. Instead of wasting hardware
cycles to update the certain bits, it's better to set them up at the
beginning.

Suggested-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210115004202.953965-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel/iommu.c
include/linux/intel-iommu.h