On Mon, Nov 28, 2022 at 10:40:48AM -0500, Matthew Rosato wrote: > On 11/24/22 7:59 AM, Jason Gunthorpe wrote: > > The iova and length are the range being invalidated, the driver has no > > control over them and length is probably multiple pages. > > > > But this test doesn't look right? > > > > if (iova > q->saved_iova && q->saved_iova < iova + length)> > > Since the page was pinned we can assume iova and length are already > > PAGE_SIZE aligned. > > Yeah, I think that would be fine with a minor tweak to pick up q->saved_iova at the very start of the iova range: > > if (iova >= q->saved_iova && q->saved_iova < iova + length) > Yi can you update and repost this please? I don't know if we will get a rc8, but we must be prepared with a final branch by Friday in case not. Thanks, Jason