linux-stable/drivers/iommu
Kan Liang 586e19c88a iommu/vt-d: Retrieve IOMMU perfmon capability information
[ Upstream commit a6a5006dad ]

The performance monitoring infrastructure, perfmon, is to support
collection of information about key events occurring during operation of
the remapping hardware, to aid performance tuning and debug. Each
remapping hardware unit has capability registers that indicate support
for performance monitoring features and enumerate the capabilities.

Add alloc_iommu_pmu() to retrieve IOMMU perfmon capability information
for each iommu unit. The information is stored in the iommu->pmu data
structure. Capability registers are read-only, so it's safe to prefetch
and store them in the pmu structure. This could avoid unnecessary VMEXIT
when this code is running in the virtualization environment.

Add free_iommu_pmu() to free the saved capability information when
freeing the iommu unit.

Add a kernel config option for the IOMMU perfmon feature. Unless a user
explicitly uses the perf tool to monitor the IOMMU perfmon event, there
isn't any impact for the existing IOMMU. Enable it by default.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-3-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Stable-dep-of: 70bad345e6 ("iommu: Fix compilation without CONFIG_IOMMU_INTEL")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:20:41 -04:00
..
amd iommu/amd: Mark interrupt as managed 2024-03-26 18:20:36 -04:00
arm iommu/arm-smmu-qcom: Limit the SMR groups to 128 2024-03-06 14:45:06 +00:00
intel iommu/vt-d: Retrieve IOMMU perfmon capability information 2024-03-26 18:20:41 -04:00
Kconfig
Makefile
apple-dart.c iommu/dart: Fix apple_dart_device_group for PCI groups 2023-03-10 09:33:36 +01:00
dma-iommu.c iommu/dma: Trace bounce buffer usage when mapping buffers 2024-01-25 15:27:43 -08:00
dma-iommu.h
exynos-iommu.c
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c
io-pgfault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c
io-pgtable-arm.h
io-pgtable-dart.c
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sva-lib.c
iommu-sva-lib.h
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Avoid more races around device probe 2023-12-13 18:39:17 +01:00
iova.c iommu/iova: Fix alloc iova overflows issue 2023-01-18 11:58:20 +01:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu/mediatek: Fix share pgtable for iova over 4GB 2023-10-10 22:00:41 +02:00
mtk_iommu_v1.c iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() 2023-01-18 11:58:21 +01:00
of_iommu.c iommu: Avoid more races around device probe 2023-12-13 18:39:17 +01:00
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu: rockchip: Fix directory table address encoding 2023-09-13 09:42:50 +02:00
s390-iommu.c
sprd-iommu.c iommu/sprd: Release dma buffer to avoid memory leak 2024-03-06 14:45:05 +00:00
sun50i-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c iommu/virtio: Return size mapped for a detached domain 2023-07-19 16:21:20 +02:00