OSDN Git Service

iommu/vt-d: Global devTLB flush when present context entry changed
authorSanjay Kumar <sanjay.k.kumar@intel.com>
Mon, 12 Jul 2021 07:13:15 +0000 (15:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 14 Jul 2021 10:57:39 +0000 (12:57 +0200)
commit37764b952e1b39053defc7ebe5dcd8c4e3e78de9
treeaf5662605b316cd9dc15772f526f11bea907f4dc
parentce36c94214f0d534aad4adb4219cc046270948fb
iommu/vt-d: Global devTLB flush when present context entry changed

This fixes a bug in context cache clear operation. The code was not
following the correct invalidation flow. A global device TLB invalidation
should be added after the IOTLB invalidation. At the same time, it
uses the domain ID from the context entry. But in scalable mode, the
domain ID is in PASID table entry, not context entry.

Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210712071315.3416543-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c