From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amdgpu: SVM VRAM migration via drm_pagemap (XNACK-on) Date: Sat, 16 May 2026 12:15:37 +1000 Message-ID: In-Reply-To: <20260513095734.69598-1-Junhua.Shen@amd.com> References: <20260513095734.69598-1-Junhua.Shen@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/amdgpu: SVM VRAM migration via drm_pagemap (XNACK-on) Author: Junhua Shen Patches: 9 Reviewed: 2026-05-16T12:15:37.387075 --- This v4 series adds VRAM migration support to amdgpu's new drm_gpusvm-based= SVM implementation, enabling GPU fault-driven (XNACK-on) migration of page= s between system RAM and VRAM using SDMA. The series is well-structured, wi= th each patch building logically on the previous one, and the architecture = =E2=80=94 wrapping `dev_pagemap` + `drm_pagemap` in `amdgpu_pagemap`, intro= ducing `amdgpu_bo_svm` as a lightweight BO subtype =E2=80=94 is sound and f= ollows the Xe driver precedent. **Strengths:** - Good documentation: the address-space diagram in patch 1 and per-function= kerneldoc are helpful - Clean layering: infrastructure =E2=86=92 SDMA callbacks =E2=86=92 TTM evi= ction =E2=86=92 range helpers =E2=86=92 hookup - Proper use of existing APIs (devm_memremap_pages, drm_pagemap framework, = GART windowed SDMA) **Concerns:** - The `drm_pagemap_init()` error path in patch 1 leaks the `devm_memremap_p= ages` registration - The SDMA copy functions have significant code duplication between `copy_t= o_devmem` and `copy_to_ram` - `pre_migrate_fence` parameter is unused in both copy callbacks - The `#if IS_ENABLED(CONFIG_DRM_AMDGPU_SVM)` guards in patch 5 are unneces= sary since `amdgpu_svm_migration_init()` already has a static inline stub - Migration failure in the fault path is silently ignored, which may lead t= o infinite fault loops --- --- Generated by Claude Code Patch Reviewer