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

Joerg Roedel
2020-01-24T14:29:20Z

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@linuxfoundation.org>
> ---
> 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.