From: alison.schofield@intel.com
To: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/6] CXL Poison List Retrieval & Tracing
Date: Thu, 10 Nov 2022 19:12:38 -0800 [thread overview]
Message-ID: <cover.1668115235.git.alison.schofield@intel.com> (raw)
From: Alison Schofield <alison.schofield@intel.com>
Add support for retrieving device poison lists and store the returned
error records as kernel trace events.
The handling of the poison list is guided by the CXL 3.0 Specification
Section 8.2.9.8.4.1. [1]
Example, triggered by memdev:
$ echo 1 > /sys/bus/cxl/devices/mem3/trigger_poison_list
cxl_poison: memdev=mem3 pcidev=cxl_mem.3 region= region_uuid=00000000-0000-0000-0000-000000000000 dpa=0x0 length=0x40 source=Internal flags= overflow_time=0
Example, triggered by region:
$ echo 1 > /sys/bus/cxl/devices/region5/trigger_poison_list
cxl_poison: memdev=mem0 pcidev=cxl_mem.0 region=region5 region_uuid=bfcb7a29-890e-4a41-8236-fe22221fc75c dpa=0x0 length=0x40 source=Internal flags= overflow_time=0
cxl_poison: memdev=mem1 pcidev=cxl_mem.1 region=region5 region_uuid=bfcb7a29-890e-4a41-8236-fe22221fc75c dpa=0x0 length=0x40 source=Internal flags= overflow_time=0
Changes in v3:
- Rebase to 6.1-rc4
- Rebase picked up cxl_dpa_resource_start() (Jonathan)
- Move poison source defines to cxlmem.h from events/cxl.h
- TRACE_printk helper macros display 'Reserved' for illegal poison sources
rather than failing to parse.
- Add region uuid to the trace event.
- Always get poison, but only parse records if tracing is enabled.(Steve)
There was a little foresight on not moving the calcs to the event
definition itself, as Steve also suggested. The DPA->HPA translation
is coming, and that work seems better kept in the driver itself.
- Remove unused hpa trace field. Add back when hpa is available.
- Remove pid from cxl_poison event. Find in common event field. (Steve)
- cxl_test: Add mock support for get poison
Changes in v2:
- Added per region poison collection
- Protect poison list w mutex
- Replace range usage w resource
- S/poison_max_mer/poison_max in cxl_dev_state kdoc (Ira)
- Renamed sysfs attribute to 'trigger_poison_list'
- _store() rm chatty dev_err() msgs (Jonathan, Dan)
- _store() use kstrtobool (Jonathan, Dan)
- _store() simplify return (Jonathan)
- cxl_memdev_visible() skip local vars on way enabled_cmds (Jonathan)
- cxl_memdev_visible() use kobj_to_dev() helper (Dan)
- Misc name shortenings and cleanups.
- Replace goto w break in cxl_mem_get_poison() do-while loop.
- Don't error out on FLAGS, record in trace event.
- Add kernel CXL_POISON__LIST_MAX (64) and guard against exceeding (Dan)
- Add current->pid to trace (Dan)
- Return the poison length as multiple of 64 per spec (Jonathan)
- Mask starting address from record->address (Jonathan)
- Move range selection to sysfs_store and make cxl_mem_get_poison() accept it.
- Get both the volatile & persistent ranges per memdev.
- Add pci device name to trace (Dan)
[1]: https://www.computeexpresslink.org/download-the-specification
Alison Schofield (6):
trace, cxl: Introduce a TRACE_EVENT for CXL poison records
cxl/mbox: Add GET_POISON_LIST mailbox command
cxl/memdev: Add trigger_poison_list sysfs attribute
cxl/region: Add trigger_poison_list sysfs attribute
tools/testing/cxl: Mock the max err records field of Identify cmd
tools/testing/cxl: Mock the Get Poison List mbox command
Documentation/ABI/testing/sysfs-bus-cxl | 28 +++++++++
drivers/cxl/core/mbox.c | 81 +++++++++++++++++++++++++
drivers/cxl/core/memdev.c | 41 +++++++++++++
drivers/cxl/core/region.c | 33 ++++++++++
drivers/cxl/cxlmem.h | 51 ++++++++++++++++
include/trace/events/cxl.h | 80 ++++++++++++++++++++++++
tools/testing/cxl/test/mem.c | 35 +++++++++++
7 files changed, 349 insertions(+)
create mode 100644 include/trace/events/cxl.h
base-commit: f0c4d9fc9cc9462659728d168387191387e903cc
--
2.37.3
next reply other threads:[~2022-11-11 3:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 3:12 alison.schofield [this message]
2022-11-11 3:12 ` [PATCH v3 1/6] trace, cxl: Introduce a TRACE_EVENT for CXL poison records alison.schofield
2022-11-16 12:19 ` Jonathan Cameron
2022-12-04 22:42 ` Dan Williams
2022-11-11 3:12 ` [PATCH v3 2/6] cxl/mbox: Add GET_POISON_LIST mailbox command alison.schofield
2022-11-16 12:41 ` Jonathan Cameron
2022-11-17 23:55 ` Alison Schofield
2022-12-07 2:41 ` Dan Williams
2022-12-07 16:10 ` Alison Schofield
2022-12-07 21:39 ` Dan Williams
2022-12-08 3:47 ` Alison Schofield
2022-11-11 3:12 ` [PATCH v3 3/6] cxl/memdev: Add trigger_poison_list sysfs attribute alison.schofield
2022-11-16 12:48 ` Jonathan Cameron
2022-11-18 0:15 ` Alison Schofield
2022-11-11 3:12 ` [PATCH v3 4/6] cxl/region: " alison.schofield
2022-11-16 12:50 ` Jonathan Cameron
2022-11-18 0:24 ` Alison Schofield
2022-11-11 3:12 ` [PATCH v3 5/6] tools/testing/cxl: Mock the max err records field of Identify cmd alison.schofield
2022-11-16 12:51 ` Jonathan Cameron
2022-11-18 0:25 ` Alison Schofield
2022-11-11 3:12 ` [PATCH v3 6/6] tools/testing/cxl: Mock the Get Poison List mbox command alison.schofield
2022-11-16 12:52 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1668115235.git.alison.schofield@intel.com \
--to=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox