[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121145817.GB1784626@yaz-khff2.amd.com>
Date: Wed, 21 Jan 2026 09:58:17 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: dan.j.williams@...el.com
Cc: Robert Richter <rrichter@....com>,
Peter Zijlstra <peterz@...radead.org>,
Dave Jiang <dave.jiang@...el.com>, Ard Biesheuvel <ardb@...nel.org>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>,
Joshua Hahn <joshua.hahnjy@...il.com>,
Borislav Petkov <bp@...en8.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
John Allen <john.allen@....com>
Subject: Re: [PATCH v9 10/13] cxl: Enable AMD Zen5 address translation using
ACPI PRMT
On Tue, Jan 20, 2026 at 04:35:57PM -0800, dan.j.williams@...el.com wrote:
> Yazen Ghannam wrote:
> [..]
> > Additionally, the same translation code can be used in multiple places
> > (tools, FW, kernel, etc.). Most consumers treat the code like a library
> > that they include. It's coded once and bugs can be fixed in one place.
> >
> > However, with a native kernel driver, we have to re-write everything to
> > match coding style, licensing, etc.
> >
> > Also, new hardware may need changes to the code (sometimes major). So
> > there's upstream work, backporting (more testing), and so on.
> >
> > See the AMD Address Translation Library at drivers/ras/amd/atl/.
>
> There is more nuance here.
>
> There are indeed cases where there are high degrees of non-architectural
> details in flux from one product to the next. For example, the details
> that EDAC no longer needs to chase because the ADXL DSM exists are a
> solution to the problem of shifting and complicated memory topology
> details.
>
Right, this is the intended use case.
> CXL is a standard that this architecture at issue decided to inject
> software-model-destroying artificats like CXL-endpoint-HPA to
> CXL-Host-Bridge-SPA (Normalized Addressing) translation.
>
> A Normalized Address looks like a static offset per host bridge, not a
> method call round trip to a runtime firmware service.
>
> Note that there are other platforms that break basic HPA-to-SPA
> assumptions, but those have been handled with native driver support via
> XOR interleave, and non-CXL-Host-Bridge target updates to the
> ACPI.CEDT.CFMWS table.
>
I see. So the concern is including model-specific methods that would
modify the CXL standard flow, correct?
Or, more specifically, is it reliance on external/system-specific
information?
Or the time spent on a round trip call to another service?
> > > > Worse, you might have to deal with various incompatible buggy PRM
> > > > versions because BIOS :/
> > >
> > > The address translation functions are straight forward. I haven't
> > > experienced any issues here. If there would be any, this will be
> > > solvable, e.g. by requiring a specific minimum version or uuid to run
> > > PRM.
> > >
> >
> > This is a good point, and I've brought this up with some of my
> > colleagues.
>
> The more that software bugs leak into this interface requiring
> consideration of versions and the like, the louder the requests for
> "please move this to a driver" will become.
>
Yes, ack.
> > The PRM methods are supposed to be able to be updated at runtime by the
> > OS. We could think of this as a similar flow to microcode.
>
> No, at the point where runtime updates are needed outside of a BIOS
> update we have crossed the threshold into Linux actively taking on new
> maintenance burden to enable hardware platforms to avoid the discipline
> of architectural solutions.
>
> Microcode is a confined solution space. PRM is unbounded.
>
> Now, stepping back, this specific Zen5 support has been a long time
> coming. Specifically, there are shipping platforms where Linux is unable
> to use any of its CXL RAS support because it gets tripped up on this
> fundamental step. I would like to see exact details on what this PRM
> handler is doing so that we, linux-cxl community, can make a
> determination about:
>
> "yes this algorithm is so tiny and static, PRM not indicated"
>
> "no, this is complicated and guaranteed to keep shifting product to
> product, Linux is better off with a PRM helper"
>
> ...but still merge this PRM call, regardless of the determination. Put
> the next potential use of PRM on notice that native drivers are required
> outside of meeting the "complicated + shifting" criteria that indicate
> PRM.
I can give a general overview. The AMD CXL address translation flows are
an extension of the AMD Data Fabric address translation flows.
Specifically for Zen5, it would be "DF v4.5" with adjustments for CXL.
The "DF 4.5" translation is upstream in the AMD Address Translation
Library. See code examples with "git grep -i df4p5".
I would consider this "complicated + shifting". This is true for general
memory errors reported through MCA/EDAC.
I defer to my CXL colleagues if the "shifting" criteria applies to
future CXL systems.
Thanks,
Yazen
Powered by blists - more mailing lists