Re: [PATCH v2] iommu: amd: Fix IOMMU perf counter clobbering during init

From: Joerg Roedel
Date: Fri Jan 24 2020 - 09:29:20 EST


On Thu, Jan 23, 2020 at 03:32:14PM -0700, Shuah Khan wrote:
> 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@xxxxxxxxxxxxxxxxxxx>
> ---
> Changes since v1:
> -- Fix bug in sucessful return path. Add a return instead of
> fall through to pc_false error case
>
> drivers/iommu/amd_iommu_init.c | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)

Applied for v5.5, thanks.