From: Shiju Jose <[email protected]>
Add updates for the CXL spec rev3.2 changes, in the CXL events reporting
and QMP command to inject CXL events.
Add maintenance support and emulation support for memory Post Package
Repair(PPR) and memory sparing control features.
Add support for reporting the memory sparing event record.
Changes
=======
v4 -> v5:
1. Changes for comments from Markus Armbruster (Thanks)
1.1. Fixed documentation issues in qapi/cxl.json
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
1.2. https://lore.kernel.org/all/[email protected]/
Factor out common command arguments for 3 injection events commands
using struct.
2. Changes for comments from Jonathan Cameron (Thanks)
2.1 Removed tabs in qapi/cxl.json
https://lore.kernel.org/all/[email protected]/
2.2. https://lore.kernel.org/all/[email protected]/
- Rename title of patch [6] to add Post Package Repair
- Removed QLIST_REMOVE(ent, node); and g_free(ent);
when find the maintenance node in the queue list.
- Changes to store the memory geometry details when they were injected
for the sparing record.
2.3. https://lore.kernel.org/all/[email protected]/
- Removed wrapping for 'bytes_to_copy' variable in memcpy in few places.
v3 -> v4:
1. Took patches applied by Jonathan to recent tag 'cxl-2025-07-03'.
2. Add few more improvements to maintenance PPR[ patch 6] and sparing
[patch 7] feature patches.
v2 -> v3:
1. Changes for the feedback from Jonathan on v2.
https://lore.kernel.org/all/[email protected]/
1.1. https://lore.kernel.org/all/[email protected]/
- Wrap this is sub 70 and should aim for about 75 for commit descriptions.
- hdr->ld_id = ld_id; to stw_le_p(&hdr->ld_id, ld_id); in
cxl_assign_event_header()
- Make maint_class, maint_subclass, ld_id and head_id as optional
parameters in QMP for
relevant events
- In QMP rename maint-class to maint-op-class, maint_subclass to
maint-op-subclass
In functions, rename parameters, class to maint_op_class, subclass to
maint_op_subclass etc.
1.2. https://lore.kernel.org/all/[email protected]/
- Make cme-ev-flags and cme-count for general media events as optional
parameters in the QMP.
- Make cme-ev-flags and cvme-count for DRAM event as optional parameters in
the QMP.
1.3. https://lore.kernel.org/all/[email protected]/
- Add variable declarations at start of the local scope.
1.4. https://lore.kernel.org/all/[email protected]/
- Adjust indent style in few places.
- Add support for produce a Memory Sparing Event Record and enabled for
ppr maintenance request.
- Replaced hard coded values in few switch-cases with macro definition in
few places.
- Replaced CXL_MBOX_UNSUPPORTED with CXL_MBOX_INVALID_INPUT.
1.5. https://lore.kernel.org/all/[email protected]/
- Add support for memory sparing resource availability.
- LOG_UNIMP logs for sparing maint op removed.
- Replaced CXL_MBOX_UNSUPPORTED with CXL_MBOX_INVALID_INPUT.
v1 -> v2:
1. QMP CXL event injection code has updated for the following
change in CXL spec r3.2 Table 8-55. Common Event Record Format,
field: Event Record Flags. Length of this field has changed
from 2 bytes to 3 bytes.
2. Rebase to recent tag 'cxl-2025-06-10'.
Davidlohr Bueso (1):
hw/cxl: Add support for Maintenance command and Post Package Repair
(PPR)
Shiju Jose (6):
hw/cxl/events: Update for rev3.2 common event record format
hw/cxl/events: Updates for rev3.2 general media event record
hw/cxl/events: Updates for rev3.2 DRAM event record
hw/cxl/events: Updates for rev3.2 memory module event record
hw/cxl/cxl-mailbox-utils: Move declaration of scrub and ECS feature
attributes in cmd_features_set_feature()
hw/cxl: Add emulation for memory sparing control feature
hw/cxl/cxl-events.c | 3 +-
hw/cxl/cxl-mailbox-utils.c | 569 +++++++++++++++++++++++++++++++++++-
hw/mem/cxl_type3.c | 332 ++++++++++++++++++++-
hw/mem/cxl_type3_stubs.c | 41 ++-
include/hw/cxl/cxl_device.h | 152 +++++++++-
include/hw/cxl/cxl_events.h | 85 +++++-
qapi/cxl.json | 184 ++++++++----
7 files changed, 1280 insertions(+), 86 deletions(-)
--
2.43.0