[RFC V2 PATCH 00/11] CXL: Process event logs

From: ira . weiny
Date: Mon Oct 10 2022 - 18:43:08 EST


From: Ira Weiny <ira.weiny@xxxxxxxxx>

Changes from RFC v1
Add event irqs
General simplification of the code.
Resolve field alignment questions
Update to rev 3.0 for comments and structures
Add reserved fields and output them

Event records inform the OS of various device events. Events are not needed
for any kernel operation but various user level software will want to track
events.

Add event reporting through the trace event mechanism. On driver load read and
clear all device events.

Enable all event logs for interrupts and process each log on interrupt.

Testing of this was performed with additions to QEMU posted here:

https://lore.kernel.org/all/20221010222944.3923556-1-ira.weiny@xxxxxxxxx/

Ira Weiny (11):
cxl/mbox: Add debug of hardware error code
cxl/mem: Implement Get Event Records command
cxl/mem: Implement Clear Event Records command
cxl/mem: Clear events on driver load
cxl/mem: Trace General Media Event Record
cxl/mem: Trace DRAM Event Record
cxl/mem: Trace Memory Module Event Record
cxl/test: Add generic mock events
cxl/test: Add specific events
cxl/test: Simulate event log overflow
cxl/mem: Wire up event interrupts

MAINTAINERS | 1 +
drivers/cxl/core/mbox.c | 186 ++++++++++++-
drivers/cxl/cxlmem.h | 193 +++++++++++++
drivers/cxl/pci.c | 154 ++++++++++
include/trace/events/cxl.h | 478 ++++++++++++++++++++++++++++++++
include/uapi/linux/cxl_mem.h | 4 +
tools/testing/cxl/test/Kbuild | 2 +-
tools/testing/cxl/test/events.c | 329 ++++++++++++++++++++++
tools/testing/cxl/test/events.h | 9 +
tools/testing/cxl/test/mem.c | 34 +++
10 files changed, 1388 insertions(+), 2 deletions(-)
create mode 100644 include/trace/events/cxl.h
create mode 100644 tools/testing/cxl/test/events.c
create mode 100644 tools/testing/cxl/test/events.h


base-commit: e2302539dd4f1c62d96651c07ddb05aa2461d29c
--
2.37.2