Skip to content

Add CXL 2.0 DVSEC Decoding

Ben Widawsky linux-pci 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9cxl: Rename variable to match other codels-ecaps.c+10 -100 replies
2/9cxl: Make id check more explicitls-ecaps.c+6 -30 replies
3/9cxl: Collect all DVSEC Device fieldsls-ecaps.c+1 -10 replies
4/9cxl: Rework caps to new functionls-ecaps.c+26 -120 replies
5/9cxl: Rename caps to be device capslib/header.h ls-ecaps.c+27 -270 replies
6/9cxl: Implement more device DVSEC decodinglib/header.h ls-ecaps.c+88 -01 reply
7/9cxl: Add support for DVSEC port caplib/header.h ls-ecaps.c+48 -60 replies
8/9cxl: Add DVSEC Register Locatorlib/header.h ls-ecaps.c+52 -00 replies
9/9cxl: Add placeholder for undecoded DVSECsls-ecaps.c+15 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] Add CXL 2.0 DVSEC Decoding

This series improves decoding of CXL 2.0 DVSEC registers by adding more DVSEC identifiers and adding fields for the existing decoded identifier. Not all DVSEC fields from 2.0 spec are enabled here, only enough for what we needed in driver bring-up. The restructuring of the code does make it easy to add support for the remaining fields. I submitted a PR for this on github a few months ago [1]. The spec is available for download [2].

Breakdown of patches:
1-5: Rework existing decoding to support more DVSEC IDs 6: Improve CXL Device Decoding (8.1.3 from CXL 2.0 spec) 7: Add port capabilities (8.1.5 from CXL 2.0 spec) 8: Add register locator (8.1.9 from CXL 2.0 spec) 9: Report undecoded DVSECs

Here is an example decoded output of a 5.12 based kernel running in QEMU emulation [3]

36:00.0 Memory controller [0502]: Intel Corporation Device 0d93 (rev 01) (prog-if 10)
Subsystem: Red Hat, Inc. Device 1100

<...>

Capabilities: [100 v1] Designated Vendor-Specific: Vendor=1e98 ID=0000 Rev=1 Len=56: CXL
CXLCap: Cache- IO+ Mem+ Mem HW Init+ HDMCount 1 Viral-
CXLCtl: Cache- IO+ Mem+ Cache SF Cov 0 Cache SF Gran 0 Cache Clean- Viral-
CXLSta: Viral-
CXLSta2: ResetComplete+ ResetError- PMComplete-
Cache Size Not Reported
Range1: 10000000-fffffff
Valid+ Active+ Type=CDAT Class=CDAT interleave=0 timeout=1s
Range2: 0-ffffffffffffffff
Valid- Active- Type=Volatile Class=DRAM interleave=0 timeout=1s
Capabilities: [138 v1] Designated Vendor-Specific: Vendor=1e98 ID=0008 Rev=0 Len=36: CXL
Block2 BIR: bar0 ID: component registers
RegisterOffset: 0000000000000000
Block3 BIR: bar2 ID: CXL device registers
RegisterOffset: 0000000000000000
Kernel driver in use: cxl_pci

Ben Widawsky (9):
cxl: Rename variable to match other code
cxl: Make id check more explicit
cxl: Collect all DVSEC Device fields
cxl: Rework caps to new function
cxl: Rename caps to be device caps
cxl: Implement more device DVSEC decoding
cxl: Add support for DVSEC port cap
cxl: Add DVSEC Register Locator
cxl: Add placeholder for undecoded DVSECs

 lib/header.h |  78 ++++++++++++++-----
 ls-ecaps.c   | 206 ++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 249 insertions(+), 35 deletions(-)

[1]: https://github.com/pciutils/pciutils/pull/59
[2]: https://www.computeexpresslink.org/download-the-specification
[3]: https://gitlab.com/bwidawsk/qemu

Signature · 5 lines
2.31.1


-- 
2.31.1