Re: [PATCH 1/4] platform/nvidia: Introduce nvgrace-egm driver and enumerate EGM regions

From: Jason Gunthorpe

Date: Fri Jul 03 2026 - 10:23:00 EST


On Fri, Jul 03, 2026 at 12:22:21AM +0200, Armin Wolf wrote:
> > - Walk all PCI devices at module init time. For each one advertising
> > "nvidia,egm-pxm", read the EGM region properties (base SPA, size and
> > PXM domain) from the ACPI DSD table via the GPU device handle, using
> > "nvidia,egm-base-pa" and "nvidia,egm-size" properties.
> > - Maintain a module-level list (egm_chardevs) of discovered regions,
> > de-duplicating by PXM so each socket gets exactly one EGM device
> > regardless of how many GPUs it has (2 GPUs per EGM device in GB200).
>
> I assume that the PCI device itself is being handled by the GPU driver, right?
> In this case i suggest that you do the discovery inside the GPU driver during probing,
> otherwise you might run intro problems once PCI hotplug comes into play.

IMHO the ACPI modeling placing the egm-base-pa under the PCI device is
not really very good (but we are stuck with it). The EGM is an
entirely distinct object from the PCI device. The ACPI is just saying
that the PCI device has efficient access to the EGM.

It wouldn't make any sense to involve the GPU driver since the GPU
driver doesn't even run on the hypervisor.

Jason