[PATCH v2 0/5] hw/cxl: add trace-events coverage

Junjie Cao posted 5 patches 2 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260611063027.1166493-1-junjie.cao@intel.com
Maintainers: Jonathan Cameron <jonathan.cameron@huawei.com>, Fan Ni <fan.ni@samsung.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
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
[PATCH v2 0/5] hw/cxl: add trace-events coverage
Posted by Junjie Cao 2 weeks, 1 day ago
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/20260603013420.904749-1-junjie.cao@intel.com/

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