RE: [PATCH v1 2/2] swiotlb: Fix slot alignment checks

From: Dexuan Cui
Date: Wed Apr 05 2023 - 02:00:25 EST


> From: Petr Tesařík <petr@xxxxxxxxxxx>
> Sent: Tuesday, April 4, 2023 10:51 PM
> > ...
> > Argh, you're right. This is a braino. The alignment mask is in fact an
> > INVERTED mask, i.e. it masks off bits that are not relevant for the
> > alignment. The more strict alignment needed the more bits must be set,
> > so the individual alignment constraints must be combined with an OR
> > instead of an AND.
> >
> > Can you apply the following change and check if it fixes the issue?
>
> Actually, this will not work either. The mask is used to mask off both
It works for me.

> high address bits and low address bits (below swiotlb slot granularity).
>
> What should help is this:
> ...
This also works for me.

Thanks, *either* version can resolve the issue for me :-)