cxl, doc: Remove isonum.txt inclusion
Subsystems (2)
PATCH v5 1/3 cxl, doc: Remove isonum.txt inclusion
This patch removes the line to include:: <isonum.txt>. From Jon:
"This include has been cargo-culted around the docs...the only real use of it is to write |copy| rather than ©, but these docs don't even do that. It can be taken out."
---
v4:
* updated sob-chain,
v3:
* Separated change into this new patch (Jonathan Cameron).
v2:
* Removed include:: <isonum.txt> line as part of file separation in another patch (Jonathan Corbet)
--- Documentation/driver-api/cxl/conventions.rst | 1 - 1 file changed, 1 deletion(-)
Documentation/driver-api/cxl/conventions.rst +0 -1
@@ -1,5 +1,4 @@ .. SPDX-License-Identifier: GPL-2.0 -.. include:: <isonum.txt> ======================================= Compute Express Link: Linux Conventions
base-commit: 075beffc378e799a0c7ec7332213bfffd9a16aea
Signature · 1 line
2.47.3
PATCH v5 2/3 cxl, doc: Moving conventions in separate files
Moving conventions in separate files.
---
v4:
* updated sob-chain,
v3:
* updated sob-chain,
* move isonum.txt removal to separate patch (Jonathan Cameron),
* kept intro in conventions.rst (Jonathan Cameron),
* removed additional blank line in template (Jonathan Cameron),
v2:
* removed include:: <isonum.txt> line (Jonathan Corbet).
--- Documentation/driver-api/cxl/conventions.rst | 176 +----------------- .../driver-api/cxl/conventions/cxl-lmh.rst | 135 ++++++++++++++ .../driver-api/cxl/conventions/template.rst | 37 ++++ 3 files changed, 178 insertions(+), 170 deletions(-) create mode 100644 Documentation/driver-api/cxl/conventions/cxl-lmh.rst create mode 100644 Documentation/driver-api/cxl/conventions/template.rst
Documentation/driver-api/cxl/conventions.rst +6 -170
@@ -1,8 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 -======================================= Compute Express Link: Linux Conventions -======================================= +####################################### There exists shipping platforms that bend or break CXL specification expectations. Record the details and the rationale for those deviations.
@@ -10,172 +9,9 @@ Borrow the ACPI Code First template format to capture the assumptions and tradeoffs such that multiple platform implementations can follow the same convention. -<(template) Title> -================== +.. toctree:: + :maxdepth: 1 + :caption: Contents -Document --------- -CXL Revision <rev>, Version <ver> - -License -------- -SPDX-License Identifier: CC-BY-4.0 - -Creator/Contributors --------------------- - -Summary of the Change ---------------------- - -<Detail the conflict with the specification and where available the -assumptions and tradeoffs taken by the hardware platform.> - - -Benefits of the Change ----------------------- - -<Detail what happens if platforms and Linux do not adopt this -convention.> - -References ----------- - -Detailed Description of the Change ----------------------------------- - -<Propose spec language that corrects the conflict.> - - -Resolve conflict between CFMWS, Platform Memory Holes, and Endpoint Decoders -============================================================================ - -Document --------- - -CXL Revision 3.2, Version 1.0 - -License -------- - -SPDX-License Identifier: CC-BY-4.0 - -Creator/Contributors --------------------- - -- Fabio M. De Francesco, Intel -- Dan J. Williams, Intel -- Mahesh Natu, Intel - -Summary of the Change ---------------------- - -According to the current Compute Express Link (CXL) Specifications (Revision -3.2, Version 1.0), the CXL Fixed Memory Window Structure (CFMWS) describes zero -or more Host Physical Address (HPA) windows associated with each CXL Host -Bridge. Each window represents a contiguous HPA range that may be interleaved -across one or more targets, including CXL Host Bridges. Each window has a set -of restrictions that govern its usage. It is the Operating System-directed -configuration and Power Management (OSPM) responsibility to utilize each window -for the specified use. - -Table 9-22 of the current CXL Specifications states that the Window Size field -contains the total number of consecutive bytes of HPA this window describes. -This value must be a multiple of the Number of Interleave Ways (NIW) * 256 MB. - -Platform Firmware (BIOS) might reserve physical addresses below 4 GB where a -memory gap such as the Low Memory Hole for PCIe MMIO may exist. In such cases, -the CFMWS Range Size may not adhere to the NIW * 256 MB rule. - -The HPA represents the actual physical memory address space that the CXL devices -can decode and respond to, while the System Physical Address (SPA), a related -but distinct concept, represents the system-visible address space that users can -direct transaction to and so it excludes reserved regions. - -BIOS publishes CFMWS to communicate the active SPA ranges that, on platforms -with LMH's, map to a strict subset of the HPA. The SPA range trims out the hole, -resulting in lost capacity in the Endpoints with no SPA to map to that part of -the HPA range that intersects the hole. - -E.g, an x86 platform with two CFMWS and an LMH starting at 2 GB: - - +--------+------------+-------------------+------------------+-------------------+------+ - | Window | CFMWS Base | CFMWS Size | HDM Decoder Base | HDM Decoder Size | Ways | - +========+============+===================+==================+===================+======+ - | 0 | 0 GB | 2 GB | 0 GB | 3 GB | 12 | - +--------+------------+-------------------+------------------+-------------------+------+ - | 1 | 4 GB | NIW*256MB Aligned | 4 GB | NIW*256MB Aligned | 12 | - +--------+------------+-------------------+------------------+-------------------+------+ - -HDM decoder base and HDM decoder size represent all the 12 Endpoint Decoders of -a 12 ways region and all the intermediate Switch Decoders. They are configured -by the BIOS according to the NIW * 256MB rule, resulting in a HPA range size of -3GB. Instead, the CFMWS Base and CFMWS Size are used to configure the Root -Decoder HPA range that results smaller (2GB) than that of the Switch and -Endpoint Decoders in the hierarchy (3GB). - -This creates 2 issues which lead to a failure to construct a region: - -1) A mismatch in region size between root and any HDM decoder. The root decoders - will always be smaller due to the trim. - -2) The trim causes the root decoder to violate the (NIW * 256MB) rule. - -This change allows a region with a base address of 0GB to bypass these checks to -allow for region creation with the trimmed root decoder address range. - -This change does not allow for any other arbitrary region to violate these -checks - it is intended exclusively to enable x86 platforms which map CXL memory -under 4GB. - -Despite the HDM decoders covering the PCIE hole HPA region, it is expected that -the platform will never route address accesses to the CXL complex because the -root decoder only covers the trimmed region (which excludes this). This is -outside the ability of Linux to enforce. - -On the example platform, only the first 2GB will be potentially usable, but -Linux, aiming to adhere to the current specifications, fails to construct -Regions and attach Endpoint and intermediate Switch Decoders to them. - -There are several points of failure that due to the expectation that the Root -Decoder HPA size, that is equal to the CFMWS from which it is configured, has -to be greater or equal to the matching Switch and Endpoint HDM Decoders. - -In order to succeed with construction and attachment, Linux must construct a -Region with Root Decoder HPA range size, and then attach to that all the -intermediate Switch Decoders and Endpoint Decoders that belong to the hierarchy -regardless of their range sizes. - -Benefits of the Change ----------------------- - -Without the change, the OSPM wouldn't match intermediate Switch and Endpoint -Decoders with Root Decoders configured with CFMWS HPA sizes that don't align -with the NIW * 256MB constraint, and so it leads to lost memdev capacity. - -This change allows the OSPM to construct Regions and attach intermediate Switch -and Endpoint Decoders to them, so that the addressable part of the memory -devices total capacity is made available to the users. - -References ----------- - -Compute Express Link Specification Revision 3.2, Version 1.0 -<https://www.computeexpresslink.org/> - -Detailed Description of the Change ----------------------------------- - -The description of the Window Size field in table 9-22 needs to account for -platforms with Low Memory Holes, where SPA ranges might be subsets of the -endpoints HPA. Therefore, it has to be changed to the following: - -"The total number of consecutive bytes of HPA this window represents. This value -shall be a multiple of NIW * 256 MB. - -On platforms that reserve physical addresses below 4 GB, such as the Low Memory -Hole for PCIe MMIO on x86, an instance of CFMWS whose Base HPA range is 0 might -have a size that doesn't align with the NIW * 256 MB constraint. - -Note that the matching intermediate Switch Decoders and the Endpoint Decoders -HPA range sizes must still align to the above-mentioned rule, but the memory -capacity that exceeds the CFMWS window size won't be accessible.". + conventions/cxl-lmh.rst + conventions/template.rst
Documentation/driver-api/cxl/conventions/cxl-lmh.rst new file +135 -0
135 lines not on this page · raw message
Documentation/driver-api/cxl/conventions/template.rst new file +37 -0
@@ -0,0 +1,37 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. :: Template Title here: + +Template File +============= + +Document +-------- +CXL Revision <rev>, Version <ver> + +License +------- +SPDX-License Identifier: CC-BY-4.0 + +Creator/Contributors +-------------------- + +Summary of the Change +--------------------- + +<Detail the conflict with the specification and where available the +assumptions and tradeoffs taken by the hardware platform.> + +Benefits of the Change +---------------------- + +<Detail what happens if platforms and Linux do not adopt this +convention.> + +References +---------- + +Detailed Description of the Change +---------------------------------- + +<Propose spec language that corrects the conflict.>
Signature · 1 line
2.47.3
PATCH v5 3/3 Documentation/driver-api/cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
In reply to Robert RichterThis adds a convention document for the following patch series:
cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
Version 7 and later:
https://lore.kernel.org/linux-cxl/[email protected]/
---
v5:
* updated sob-chain (Dan),
* removed specification of _DSM,
* added PRM handler definition to the specification,
* made PRM handler mandatory including the GUID handler id to be used,
* added references to PRM spec
* revised the entire doc and made small format and grammar fixups and wording improvements,
v4:
* updated sob-chain (Dave, Alison, Jonathan, Dan),
* added additional spec change for Normalized addressing and _DSM definition for address translation (Dan),
* revised the entire doc and made small format and grammar fixups and wording improvements,
v3:
* updated link in descriptions and add Link: tag (Jonathan Cameron),
* clarified CFMWS and HPA range description (Jonathan Cameron),
* use 80 chars line limit (Jonathan Cameron),
* added block diagram to illustrate the example address mappings (Dave),
v2:
* updated sob-chain,
* spell fix in patch description (Randy),
* made small changes as suggested by Randy,
* Removed include:: <isonum.txt> line (Jon).
--- Documentation/driver-api/cxl/conventions.rst | 1 + .../driver-api/cxl/conventions/cxl-atl.rst | 304 ++++++++++++++++++ 2 files changed, 305 insertions(+) create mode 100644 Documentation/driver-api/cxl/conventions/cxl-atl.rst
Documentation/driver-api/cxl/conventions.rst +1 -0
@@ -14,4 +14,5 @@ same convention. :caption: Contents conventions/cxl-lmh.rst + conventions/cxl-atl.rst conventions/template.rst
Documentation/driver-api/cxl/conventions/cxl-atl.rst new file +304 -0
304 lines not on this page · raw message
Signature · 1 line
2.47.3
Re: [PATCH v5 3/3] Documentation/driver-api/cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
Quoted 8 lines · Robert Richter
This adds a convention document for the following patch series:
cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
Version 7 and later:
Quoted 7 lines
Reviewed-by Gregory Price <[email protected]>Reviewed-by Dave Jiang <[email protected]>Reviewed-by Alison Schofield <[email protected]>Reviewed-by Jonathan Cameron <[email protected]>Reviewed-by Dan Williams <[email protected]>Acked-by Dan Williams <[email protected]>
Can drop this ack, now that the Reviewed-by is there.
Quoted 3 lines
Signed-off-by Robert Richter <[email protected]>---
v5:
[..]
Quoted 1 line
* made PRM handler mandatory including the GUID handler id to be used,
Looks good. Going forward let us not reach for PRM ever again if it can be avoided with native driver enabling with some static platform data tables.
Re: [PATCH v5 3/3] Documentation/driver-api/cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
Quoted 22 lines · On 03.02.26 10:50:32, [email protected] wrote:
Quoted 8 lines · Robert Richter
This adds a convention document for the following patch series:
cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement
Version 7 and later:
Quoted 7 lines
Reviewed-by Gregory Price <[email protected]>Reviewed-by Dave Jiang <[email protected]>Reviewed-by Alison Schofield <[email protected]>Reviewed-by Jonathan Cameron <[email protected]>Reviewed-by Dan Williams <[email protected]>Acked-by Dan Williams <[email protected]>Can drop this ack, now that the Reviewed-by is there.
Quoted 3 lines
Signed-off-by Robert Richter <[email protected]>---
v5:
Quoted 6 lines
[..]
Quoted 1 line
* made PRM handler mandatory including the GUID handler id to be used,
Looks good. Going forward let us not reach for PRM ever again if it can be avoided with native driver enabling with some static platform data tables.
Great, many thanks to all for review, testing, etc.
-Robert