]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Fix to flush cache of PASID directory table
authorYanfei Xu <yanfei.xu@intel.com>
Wed, 9 Aug 2023 12:48:04 +0000 (20:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:54 +0000 (09:42 +0200)
commit45e3181d7995f66057bb0627f6c2994111bb86a1
tree12fe25e7feec0c8e6005050a84e2bfcc1842499f
parentd9c47d2bf3073bc78cd4f9f8a2a8c47d5d6c6031
iommu/vt-d: Fix to flush cache of PASID directory table

[ Upstream commit 8a3b8e63f8371c1247b7aa24ff9c5312f1a6948b ]

Even the PCI devices don't support pasid capability, PASID table is
mandatory for a PCI device in scalable mode. However flushing cache
of pasid directory table for these devices are not taken after pasid
table is allocated as the "size" of table is zero. Fix it by
calculating the size by page order.

Found this when reading the code, no real problem encountered for now.

Fixes: 194b3348bdbb ("iommu/vt-d: Fix PASID directory pointer coherency")
Suggested-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Yanfei Xu <yanfei.xu@intel.com>
Link: https://lore.kernel.org/r/20230616081045.721873-1-yanfei.xu@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel/pasid.c