Linux CXL
 help / color / mirror / Atom feed
* [ndctl PATCH v11 0/7] Support poison list retrieval
@ 2024-03-14  4:05 alison.schofield
  2024-03-14  4:05 ` [ndctl PATCH v11 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands alison.schofield
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: alison.schofield @ 2024-03-14  4:05 UTC (permalink / raw)
  To: Vishal Verma; +Cc: Alison Schofield, nvdimm, linux-cxl

From: Alison Schofield <alison.schofield@intel.com>

Changes since v10:
- Use offset, length notation in json output (Dan)
- Remove endpoint decoder from json output
- Man page updates to reflect above changes
- Remove open coded tep_find_field() (Dan)
- Use raw instead of custom string helper 
- Use get_field_val() in u8,32,64 helpers instead of _raw (Dan)
- Pass event_ctx to its own parsing method as a typical 'this' pointer (Dan)
- Replace private_ctx w poison_ctx in event_ctx. This addresses Dan's
  feedback to avoid a void* but stops short of his suggestion to wrap
  event_ctx in a private_ctx for this single use case.
- v10: https://lore.kernel.org/linux-cxl/cover.1709748564.git.alison.schofield@intel.com/


Begin cover letter:
Add the option to add a memory devices poison list to the cxl-list
json output. Offer the option by memdev and by region. 

From the man page cxl-list:

       -L, --media-errors
           Include media-error information. The poison list is retrieved from
           the device(s) and media_error records are added to the listing.
           Apply this option to memdevs and regions where devices support the
           poison list capability. "offset:" is relative to the region
           resource when listing by region and is the absolute device DPA when
           listing by memdev. "source:" is one of: External, Internal,
           Injected, Vendor Specific, or Unknown, as defined in CXL
           Specification v3.1 Table 8-140.

           # cxl list -m mem9 --media-errors -u
           {
             "memdev":"mem9",
             "pmem_size":"1024.00 MiB (1073.74 MB)",
             "pmem_qos_class":42,
             "ram_size":"1024.00 MiB (1073.74 MB)",
             "ram_qos_class":42,
             "serial":"0x5",
             "numa_node":1,
             "host":"cxl_mem.5",
             "media_errors":[
               {
                 "offset":"0x40000000",
                 "length":64,
                 "source":"Injected"
               }
             ]
           }

       In the above example, region mappings can be found using: "cxl list -p
       mem9 --decoders"

           # cxl list -r region5 --media-errors -u
           {
             "region":"region5",
             "resource":"0xf110000000",
             "size":"2.00 GiB (2.15 GB)",
             "type":"pmem",
             "interleave_ways":2,
             "interleave_granularity":4096,
             "decode_state":"commit",
             "media_errors":[
               {
                 "offset":"0x1000",
                 "length":64,
                 "source":"Injected"
               },
               {
                 "offset":"0x2000",
                 "length":64,
                 "source":"Injected"
               }
             ]
           }

       In the above example, memdev mappings can be found using: "cxl list -r
       region5 --targets" and "cxl list -d <decoder_name>"



Alison Schofield (7):
  libcxl: add interfaces for GET_POISON_LIST mailbox commands
  cxl/event_trace: add an optional pid check to event parsing
  cxl/event_trace: support poison context in event parsing
  cxl/event_trace: add helpers to retrieve tep fields by type
  cxl/list: collect and parse media_error records
  cxl/list: add --media-errors option to cxl list
  cxl/test: add cxl-poison.sh unit test

 Documentation/cxl/cxl-list.txt |  62 ++++++++++-
 cxl/event_trace.c              |  51 ++++++++-
 cxl/event_trace.h              |  19 +++-
 cxl/filter.h                   |   3 +
 cxl/json.c                     | 194 +++++++++++++++++++++++++++++++++
 cxl/lib/libcxl.c               |  47 ++++++++
 cxl/lib/libcxl.sym             |   2 +
 cxl/libcxl.h                   |   2 +
 cxl/list.c                     |   3 +
 test/cxl-poison.sh             | 137 +++++++++++++++++++++++
 test/meson.build               |   2 +
 11 files changed, 514 insertions(+), 8 deletions(-)
 create mode 100644 test/cxl-poison.sh


base-commit: e0d0680bd3e554bd5f211e989480c5a13a023b2d
-- 
2.37.3


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-04-18 20:12 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-14  4:05 [ndctl PATCH v11 0/7] Support poison list retrieval alison.schofield
2024-03-14  4:05 ` [ndctl PATCH v11 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands alison.schofield
2024-03-18 17:51   ` fan
2024-03-18 20:11     ` Alison Schofield
2024-03-18 21:01       ` Dan Williams
2024-03-19 16:43         ` Alison Schofield
2024-03-14  4:05 ` [ndctl PATCH v11 2/7] cxl/event_trace: add an optional pid check to event parsing alison.schofield
2024-03-14  4:05 ` [ndctl PATCH v11 3/7] cxl/event_trace: support poison context in " alison.schofield
2024-03-14  4:05 ` [ndctl PATCH v11 4/7] cxl/event_trace: add helpers to retrieve tep fields by type alison.schofield
2024-03-15 15:44   ` Dave Jiang
2024-03-15 17:39   ` Dan Williams
2024-03-18 17:28     ` Alison Schofield
2024-03-18 21:21   ` fan
2024-03-14  4:05 ` [ndctl PATCH v11 5/7] cxl/list: collect and parse media_error records alison.schofield
2024-03-15 16:16   ` Dave Jiang
2024-03-20 20:24     ` Alison Schofield
2024-03-14  4:05 ` [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list alison.schofield
2024-03-15  1:09   ` Wonjae Lee
2024-03-15  2:36     ` Alison Schofield
2024-03-15  3:35       ` Dan Williams
2024-03-20 20:40         ` Alison Schofield
2024-03-27 19:48         ` Alison Schofield
2024-04-18 20:12           ` Alison Schofield
2024-03-15 16:41   ` Dave Jiang
2024-03-14  4:05 ` [ndctl PATCH v11 7/7] cxl/test: add cxl-poison.sh unit test alison.schofield
2024-03-15 17:03   ` Dave Jiang
2024-03-15 23:03   ` Wonjae Lee
2024-03-18 17:17     ` Alison Schofield
2024-03-20 20:42 ` [ndctl PATCH v11 0/7] Support poison list retrieval Alison Schofield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox