Commit 226954c8 authored by Yanfei Xu's avatar Yanfei Xu Committed by sanglipeng
Browse files

iommu/vt-d: Fix to flush cache of PASID directory table

stable inclusion
from stable-v5.10.195
commit 3183b0cab7b52b311e4b363c3b97b8147217fdb8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3183b0cab7b52b311e4b363c3b97b8147217fdb8



--------------------------------

[ Upstream commit 8a3b8e63 ]

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: 194b3348 ("iommu/vt-d: Fix PASID directory pointer coherency")
Suggested-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarYanfei Xu <yanfei.xu@intel.com>
Link: https://lore.kernel.org/r/20230616081045.721873-1-yanfei.xu@intel.com


Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent df3d41c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment