linux_dsm_epyc7002/drivers/iommu/intel
Lu Baolu 1e5ac057b0 iommu/vt-d: Clear PRQ overflow only when PRQ is empty
[ Upstream commit 28a77185f1cd0650b664f54614143aaaa3a7a615 ]

It is incorrect to always clear PRO when it's set w/o first checking
whether the overflow condition has been cleared. Current code assumes
that if an overflow condition occurs it must have been cleared by earlier
loop. However since the code runs in a threaded context, the overflow
condition could occur even after setting the head to the tail under some
extreme condition. To be sane, we should read both head/tail again when
seeing a pending PRO and only clear PRO after all pending PRs have been
handled.

Suggested-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/linux-iommu/MWHPR11MB18862D2EA5BD432BF22D99A48CA09@MWHPR11MB1886.namprd11.prod.outlook.com/
Link: https://lore.kernel.org/r/20210126080730.2232859-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-17 17:06:23 +01:00
..
debugfs.c iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
dmar.c iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid() 2021-02-03 23:28:50 +01:00
iommu.c iommu/vt-d: Do not use flush-queue when caching-mode is on 2021-02-07 15:37:13 +01:00
irq_remapping.c iommu/intel: Fix memleak in intel_irq_remapping_alloc 2021-01-17 14:17:03 +01:00
Kconfig IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
Makefile iommu/vt-d: Move Kconfig and Makefile bits down into intel directory 2020-07-29 14:14:55 +02:00
pasid.c drm, iommu: Change type of pasid to u32 2020-09-17 19:21:16 +02:00
pasid.h iommu/vt-d: Fix status code for Allocate/Free PASID command 2021-03-09 11:11:15 +01:00
svm.c iommu/vt-d: Clear PRQ overflow only when PRQ is empty 2021-03-17 17:06:23 +01:00
trace.c iommu/vt-d: Move Intel IOMMU driver into subdirectory 2020-06-10 17:46:43 +02:00