From: Shiju Jose <shiju.jose@huawei.com>
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
=======
v2 -> v3:
1. Changes for the feedback from Jonathan on v2.
https://lore.kernel.org/all/20250619151619.1695-1-shiju.jose@huawei.com/
1.1. https://lore.kernel.org/all/20250620150342.000055aa@huawei.com/
- 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/20250620151314.0000535c@huawei.com/
- 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/20250620151655.00001cea@huawei.com/
- Add variable declarations at start of the local scope.
1.4. https://lore.kernel.org/all/20250620154052.00002a17@huawei.com/
- 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/20250620154813.00002bbd@huawei.com/
- 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 Maintenance support
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-mailbox-utils.c | 572 +++++++++++++++++++++++++++++++++++-
hw/mem/cxl_type3.c | 269 ++++++++++++++++-
hw/mem/cxl_type3_stubs.c | 41 ++-
include/hw/cxl/cxl_device.h | 142 ++++++++-
include/hw/cxl/cxl_events.h | 85 +++++-
qapi/cxl.json | 106 ++++++-
6 files changed, 1172 insertions(+), 43 deletions(-)
--
2.43.0