Re: iommu: amd: Fix incorrect PASID decoding from event log

From: joro@xxxxxxxxxx
Date: Tue Oct 15 2019 - 08:14:30 EST


On Mon, Oct 14, 2019 at 08:06:05PM +0000, Suthikulpanit, Suravee wrote:
> IOMMU Event Log encodes 20-bit PASID for events:
> ILLEGAL_DEV_TABLE_ENTRY
> IO_PAGE_FAULT
> PAGE_TAB_HARDWARE_ERROR
> INVALID_DEVICE_REQUEST
> as:
> PASID[15:0] = bit 47:32
> PASID[19:16] = bit 19:16
>
> Note that INVALID_PPR_REQUEST event has different encoding
> from the rest of the events as the following:
> PASID[15:0] = bit 31:16
> PASID[19:16] = bit 45:42
>
> So, fixes the decoding logic.
>
> Fixes: d64c0486ed50 ("iommu/amd: Update the PASID information printed to the system log")
> Cc: Joerg Roedel <jroedel@xxxxxxx>
> Cc: Gary R Hook <gary.hook@xxxxxxx>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> ---
> drivers/iommu/amd_iommu.c | 5 +++--
> drivers/iommu/amd_iommu_types.h | 4 ++--
> 2 files changed, 5 insertions(+), 4 deletions(-)

Applied for v5.4, thanks Suravee.