From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: mm: Add support to use PRAMIN windows to write to VRAM Date: Fri, 27 Feb 2026 14:25:28 +1000 Message-ID: In-Reply-To: <20260224225323.3312204-7-joelagnelf@nvidia.com> References: <20260224225323.3312204-1-joelagnelf@nvidia.com> <20260224225323.3312204-7-joelagnelf@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This is a substantial and well-documented patch. The PRAMIN architecture is clearly explained. Review notes: - **`#![expect(unused)]`** at module top is very broad. Consider more targeted suppressions. - The `compute_window` check: ```rust if offset_in_window + access_size > PRAMIN_SIZE { return Err(EINVAL); } ``` Since the window is 64KB-aligned and 1MB in size, and accesses are at most 8 bytes, this can only fail if the VRAM offset happens to be right at the edge of a 1MB boundary. This is correct but perhaps an edge case worth documenting in the function comment. - In `Drop for PraminWindow`: ```rust if self.state.current_base != self.saved_base { if let Some(bar) = self.bar.try_access() { Self::write_window_base(&bar, self.saved_base); ``` If `try_access()` fails (device unbound), the window base is not restored. This is silently ignored. In a teardown scenario this is probably fine, but it might be worth a `pr_warn` or at least a comment explaining why the failure is harmless. - The macros `define_pramin_read!` / `define_pramin_write!` are clean. The `bar.$name(bar_offset)` / `bar.$name(value, bar_offset)` pattern relies on the `Bar0` method names exactly matching, which couples the PRAMIN API to `Bar0`'s naming convention. --- Generated by Claude Code Patch Reviewer