]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Fix IOMMU perf counter clobbering during init
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 23 Jan 2020 22:32:14 +0000 (15:32 -0700)
committerJoerg Roedel <jroedel@suse.de>
Fri, 24 Jan 2020 14:28:40 +0000 (15:28 +0100)
commita3d4e3f66e58eafaa9d2de16bb0f6436b4caa967
tree8d9f6685bd20bd711f9f61cb6d892cac47bdd38e
parent3a4a1db39a9bc2569e4dd881c0df77687609fec6
iommu/amd: Fix IOMMU perf counter clobbering during init

init_iommu_perf_ctr() clobbers the register when it checks write access
to IOMMU perf counters and fails to restore when they are writable.

Add save and restore to fix it.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Fixes: fdd1e54b62af6 ("perf/x86/amd: Add IOMMU Performance Counter resource management")
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c