Re: [PATCH RFC] rxe: Fix iova-to-va conversion for MR page sizes != PAGE_SIZE
From: Jason Gunthorpe
Date: Mon Jan 05 2026 - 20:14:15 EST
On Fri, Dec 26, 2025 at 05:52:37PM +0800, Li Zhijian wrote:
> The current implementation incorrectly handles memory regions (MRs) with
> page sizes different from the system PAGE_SIZE. The core issue is that
> rxe_set_page() is called with mr->page_size step increments, but the
> page_list stores individual struct page pointers, each representing
> PAGE_SIZE of memory.
>
> Problem scenarios with concrete examples:
>
> 1. mr->page_size > PAGE_SIZE (e.g., 64K MR with 4K system pages):
Why does RXE even have mr->page_size at all?
Real HW has this value to optimize for large page sizes, but I'm not
sure we really need this for RXE..
Jason