Re: [PATCH 2/3] drm/amdgpu: fix VM update overrun on non-4K page kernels

Junrui Luo <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.kernel.vger.stable
Message-ID <[email protected]>
On Thu, Aug 06, 2026 at 01:59:52PM +0200, Christian König wrote:
> 
> That check is clearly not correct. The pages_addr must be fully consumed, otherwise we run into major problems later on.

Is that an invariant today?  num_entries <= AMDGPU_GPU_PAGES_IN_CPU_PAGE
skips the scan and is used as it is, so on a 64K page kernel a 4K mapping
maps a single GPU page and pages_addr is not consumed in whole CPU pages
there either.

So what should the code do for a mapping whose size is not a multiple of
AMDGPU_GPU_PAGES_IN_CPU_PAGE?  Could you sketch what you have in mind?

Thanks,
Junrui Luo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.