Re: [PATCH] iommu/amd: Fix domain flush size when syncing iotlb

From: Nadav Amit
Date: Wed May 17 2023 - 01:59:03 EST



> On May 16, 2023, at 10:49 PM, Jon Pan-Doh <pandoh@xxxxxxxxxx> wrote:
>
> !! External Email
>
> On Wed, Apr 26, 2023 at 1:32 PM Jon Pan-Doh <pandoh@xxxxxxxxxx> wrote:
>>
>> When running on an AMD vIOMMU, we observed multiple invalidations (of
>> decreasing power of 2 aligned sizes) when unmapping a single page.
>>
>> Domain flush takes gather bounds (end-start) as size param. However,
>> gather->end is defined as the last inclusive address (start + size - 1).
>> This leads to an off by 1 error.
>>
>> With this patch, verified that 1 invalidation occurs when unmapping a
>> single page.
>>
>> Fixes: a270be1b3fdf ("iommu/amd: Use only natural aligned flushes in a VM")
>> Signed-off-by: Jon Pan-Doh <pandoh@xxxxxxxxxx>
>> Tested-by: Sudheer Dantuluri <dantuluris@xxxxxxxxxx>
>> Suggested-by: Gary Zibrat <gzibrat@xxxxxxxxxx>
>
> Cc: stable@xxxxxxxxxxxxxxx

Assuming the patch was still not applied, I think that Greg KH would
prefer that you send v2 that includes the “Cc: <stable@xxxxxxxxxxxxxxx>”
(notice the “<“ and “>" signs) and ideally the version in which I added
the buggy code (sorry for that again) after a “#” sign.

I think it is version 5.15.

IOW: If the patch was still not applied by Joerg, please send v2 with:

Cc: <stable@xxxxxxxxxxxxxxx <mailto:stable@xxxxxxxxxxxxxxx>> # 5.15.x

In the commit log.