The CXL subsystem in QEMU currently has no trace coverage.  Debugging
mailbox commands, HDM decoder programming, event log activity, and
CFMWS address decoding relies on temporary printf or qemu_log_mask.

This series introduces trace-events infrastructure for the CXL
subsystem and adds 11 trace points covering the above paths.  All
events use the cxl_ prefix so -trace 'cxl_*' captures everything.

Changes since v1:
  - Split patch 2 into HDM-only; dropped CDAT traces -- source is
    commandline-controlled (Jonathan)
  - Split patch 3 into separate event-log and CFMWS patches (Jonathan)
  - Pass set and cmd as separate uint8_t parameters instead of a
    combined opcode (Jonathan)
  - Cover all 21 CXL_MBOX_INVALID_PAYLOAD_LENGTH return sites, not
    just the centralised entry check (Jonathan)
  - Rename depth -> occupancy in event log trace (Jonathan)
  - Defer passthrough-specific trace pending upstream support (Jonathan)
  - Add cxl_hdm_decoder_uncommit for commit/uncommit symmetry

v1: 
https://lore.kernel.org/qemu-devel/[email protected]/

Junjie Cao (5):
  hw/cxl: introduce trace-events infrastructure
  hw/cxl: trace mailbox command dispatch and payload errors
  hw/cxl: trace HDM decoder write, commit and uncommit
  hw/cxl: trace event log insertion, overflow and clear
  hw/cxl: trace CFMWS address-to-device routing

 hw/cxl/cxl-events.c         | 13 +++++--
 hw/cxl/cxl-host.c           |  4 +++
 hw/cxl/cxl-mailbox-utils.c  | 71 +++++++++++++++++++++++++++++++++++--
 hw/cxl/trace-events         | 15 ++++++++
 hw/cxl/trace.h              |  2 ++
 hw/mem/cxl_type3.c          | 19 +++++++++-
 hw/mem/trace-events         |  5 +++
 include/hw/cxl/cxl_device.h |  1 +
 meson.build                 |  1 +
 9 files changed, 126 insertions(+), 5 deletions(-)
 create mode 100644 hw/cxl/trace-events
 create mode 100644 hw/cxl/trace.h

-- 
2.43.0


Reply via email to