public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joel Fernandes <joelagnelf@nvidia.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: linux-kernel@vger.kernel.org,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Huang Rui" <ray.huang@amd.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Helge Deller" <deller@gmx.de>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Andrea Righi" <arighi@nvidia.com>, "Zhi Wang" <zhiw@nvidia.com>,
	"Philipp Stanner" <phasta@kernel.org>,
	"Elle Rhumsaa" <elle@weathered-steel.dev>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	joel@joelfernandes.org, nouveau@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
	linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v7 00/23] nova-core: Add memory management support
Date: Thu, 19 Feb 2026 14:48:38 -0500	[thread overview]
Message-ID: <20260219194838.GA1013545@joelbox2> (raw)
In-Reply-To: <DGJ1G3D32OMK.30HANB1W46XVL@nvidia.com>

Hi Alex,

Thanks for taking the time to go through the series and for the effort
of doing the reordering. Just to clarify, do you mean I should be
sending each of the phases separately for review instead of in one
series?

By any chance, do you have the tree after doing the rearrangement that I
could take a look at? That would be very helpful so I don't repeat your
rearrangement effort.

Some comments below:

> Nice series, a few overall remarks before I dive deeper into each patch:
>
> - Use `gpu: nova-core:` (not just `nova-core:`) as the patch prefix.

Done.

> - There were a few clippy warnings/rustfmt diffs when I built it.
> - There are build failures introduced in patches 11 and 18 - basically
>   the series doesn't build from 11 until the last patch.
> - This patchset is using the `module/mod.rs` pattern instead of
>   `module.rs` for new modules. The latter is the preferred norm IIUC.

I will work on fixing these based on the reordered patches for the next
spin.

> Phase 1: GSP plumbing
> - nova-core: gsp: Return GspStaticInfo and FbLayout from boot()
> - nova-core: gsp: Extract usable FB region from GSP
> - nova-core: fb: Add usable_vram field to FbLayout
>
> These constitute a logical change by themselves, by getting more
> information from the GSP to know how much VRAM we have. You could even
> display the result as a dev_info of dev_dbg to remove the only remaining
> `dead_code`.

This looks good to me.

> Phase 2: PRAMIN support
> - nova-core: mm: Add support to use PRAMIN windows to write to VRAM
> - docs: gpu: nova-core: Document the PRAMIN aperture mechanism
>
> PRAMIN is needed by everything that follows.

This looks good to me.

> Phase 3: GpuMm
> - nova-core: mm: Add common memory management types
> - nova-core: mm: Add TLB flush support
> - nova-core: mm: Add GpuMm centralized memory manager
> - nova-core: mm: Use usable VRAM region for buddy allocator
>
> The common memory management types patch and TLB give us all we need to
> introduce GpuMm, which makes it more accessible that after going through
> all the page table types which it doesn't depend on. This culminates
> with using the result of phase 1, which also allows you to get rid of
> the temporary 1MB window hack if you rearrange the code a bit.

Yeah, that is a nice advantage!

> Phase 4: page tables / VMM
> - nova-core: mm: Add common types for all page table formats
> - nova-core: mm: Add MMU v2 page table types
> - nova-core: mm: Add MMU v3 page table types
> - nova-core: mm: Add unified page table entry wrapper enums
> - nova-core: mm: Add page table walker for MMU v2/v3
> - nova-core: mm: Add Virtual Memory Manager
> - nova-core: mm: Add virtual address range tracking to VMM
> - nova-core: mm: Add multi-page mapping API to VMM
>
> The main course, required for BAR1 - these follow the original order.

Sounds good.

> Phase 5: BAR1
> - nova-core: Add BAR1 aperture type and size constant
> - nova-core: gsp: Add BAR1 PDE base accessors
> - nova-core: mm: Add BAR1 user interface
> - nova-core: mm: Add BarUser to struct Gpu and create at boot

These sound good to me.

> All the BAR1 stuff now happens in one place. There is certainly room for
> merging a few patches to avoid introducing dead code and eliminating
> just after.

Yeah, I tried to keep the commits at a reasonable size to make review
easier. I will look into merging a little more to see where it is possible.

> Phase 6: tests
> - nova-core: mm: Add PRAMIN aperture self-tests
> - nova-core: mm: Add BAR1 memory management self-tests

This sounds good to me.

> I have done this reordering locally and it seems to build fine.

Please share your reorder tree if you still have it. That would likely save
me a lot of effort. Thanks.

> I'll do a patch-by-patch review following this order, but I wanted to
> share it first for other reviewers of this revision as it makes the
> series more accessible IMHO.

Looking forward to it. Thanks!

--
Joel Fernandes


  reply	other threads:[~2026-02-19 19:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 21:19 [PATCH v7 00/23] nova-core: Add memory management support Joel Fernandes
2026-02-18 21:19 ` [PATCH v7 01/23] nova-core: mm: Add support to use PRAMIN windows to write to VRAM Joel Fernandes
2026-02-18 21:19 ` [PATCH v7 02/23] docs: gpu: nova-core: Document the PRAMIN aperture mechanism Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 03/23] nova-core: Add BAR1 aperture type and size constant Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 04/23] nova-core: gsp: Add BAR1 PDE base accessors Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 05/23] nova-core: mm: Add common memory management types Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 06/23] nova-core: mm: Add common types for all page table formats Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 07/23] nova-core: mm: Add MMU v2 page table types Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 08/23] nova-core: mm: Add MMU v3 " Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 09/23] nova-core: mm: Add unified page table entry wrapper enums Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 10/23] nova-core: mm: Add TLB flush support Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 11/23] nova-core: mm: Add GpuMm centralized memory manager Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 12/23] nova-core: mm: Add page table walker for MMU v2/v3 Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 13/23] nova-core: mm: Add Virtual Memory Manager Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 14/23] nova-core: mm: Add virtual address range tracking to VMM Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 15/23] nova-core: mm: Add multi-page mapping API " Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 16/23] nova-core: mm: Add BAR1 user interface Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 17/23] nova-core: gsp: Return GspStaticInfo and FbLayout from boot() Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 18/23] nova-core: mm: Add BAR1 memory management self-tests Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 19/23] nova-core: mm: Add PRAMIN aperture self-tests Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 20/23] nova-core: gsp: Extract usable FB region from GSP Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 21/23] nova-core: fb: Add usable_vram field to FbLayout Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 22/23] nova-core: mm: Use usable VRAM region for buddy allocator Joel Fernandes
2026-02-18 21:20 ` [PATCH v7 23/23] nova-core: mm: Add BarUser to struct Gpu and create at boot Joel Fernandes
2026-02-19 15:20 ` [PATCH v7 00/23] nova-core: Add memory management support Alexandre Courbot
2026-02-19 19:48   ` Joel Fernandes [this message]
2026-02-20  1:54     ` Alexandre Courbot
2026-02-20  3:25     ` Alexandre Courbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260219194838.GA1013545@joelbox2 \
    --to=joelagnelf@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=alex.gaynor@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=aliceryhl@google.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=apopple@nvidia.com \
    --cc=arighi@nvidia.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=elle@weathered-steel.dev \
    --cc=gary@garyguo.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joel@joelfernandes.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=phasta@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tmgross@umich.edu \
    --cc=tursulin@ursulin.net \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox