Skip to content

Enabling DCD emulation support in Qemu

[email protected] linux-cxl qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest14 patches 13 repliesIn review
  2. v712 patches 52 repliesSuperseded
  3. v612 patches 36 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v513 patches45 repliesSuperseded
v410 patches25 repliesSuperseded
v39 patches27 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14hw/cxl/mailbox: change CCI cmd set structure to be a member, not a referencehw/cxl/cxl-mailbox-utils.c include/hw/cxl/cxl_device.h+16 -50 replies
2/14hw/cxl/mailbox: interface to add CCI commands to an existing CCIhw/cxl/cxl-mailbox-utils.c include/hw/cxl/cxl_device.h+19 -20 replies
3/14hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device commandhw/cxl/cxl-mailbox-utils.c+4 -10 replies
4/14hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command supporthw/cxl/cxl-mailbox-utils.c include/hw/cxl/cxl_device.h+112 -00 replies
5/14include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory deviceshw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c include/hw/cxl/cxl_device.h+7 -70 replies
6/14hw/mem/cxl_type3: Add support to create DC regions to type3 memory deviceshw/mem/cxl_type3.c+53 -01 reply
7/14hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argumenthw/mem/cxl_type3.c+9 -60 replies
8/14hw/mem/cxl_type3: Add host backend and address space handling for DC regionshw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c include/hw/cxl/cxl_device.h+162 -363 replies
9/14hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox supporthw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c include/hw/cxl/cxl_device.h+95 -10 replies
10/14hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity responsehw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c include/hw/cxl/cxl_device.h+409 -00 replies
11/14hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extentshw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c hw/mem/cxl_type3_stubs.c +3 more+563 -136 replies
12/14hw/mem/cxl_type3: Add DPA range validation for accesses to DC regionshw/cxl/cxl-mailbox-utils.c hw/mem/cxl_type3.c include/hw/cxl/cxl_device.h+86 -00 replies
13/14hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox supporthw/cxl/cxl-mailbox-utils.c+8 -130 replies
14/14hw/mem/cxl_type3: Allow to release extent superset in QMP interfacehw/mem/cxl_type3.c+1 -10 replies

Reviews trailers per patch

12 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGregory PriceJonathan CameronSvetly TodorovLi Zhijian
SeriesR-b
1/14
2/14
3/14R-b R-b
4/14R-b R-b
5/14R-b R-b
6/14R-b R-b R-b
7/14R-b R-b
8/14R-b
9/14R-b T-b
10/14R-b T-b
11/14R-b T-b
12/14R-b R-b T-b
13/14R-b T-b
14/14R-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v8 thread

Cover letter [PATCH v8 00/14] Enabling DCD emulation support in Qemu

From: Fan Ni <[email protected]>

A git tree of this series can be found here (with one extra commit on top for printing out accepted/pending extent list for testing):
https://github.com/moking/qemu/tree/dcd-v8-qapi

v7->v8:

This version carries over the following two patches from Gregory.
1. hw/cxl/mailbox: change CCI cmd set structure to be a member, not a reference
https://gitlab.com/jic23/qemu/-/commit/f44ebc5a455ccdd6535879b0c5824e0d76b04da5
2. hw/cxl/mailbox: interface to add CCI commands to an existing CCI
https://gitlab.com/jic23/qemu/-/commit/00a4dd8b388add03c588298f665ee918626296a5

Note, the above two patches are not directly related to DCD emulation.

All the following patches in this series are built on top of mainstream QEMU and the above two patches.

The most significant changes of v8 is in Patch 11 (Patch 9 in v7). Based on feedback from Markus and Jonathan, the QMP interfaces for adding and releasing DC extents have been redesigned and now they look like below,

# add a 128MB extent at offset 0 to region 0
	{ "execute": "cxl-add-dynamic-capacity",
	  "arguments": {
		  "path": "/machine/peripheral/cxl-memdev0",
          "host-id":0,
          "selection-policy": 'prescriptive',
		  "region": 0,
          "tag": "",
		  "extents": [
		  {
			  "offset": 0,
			  "len": 134217728
		  }
		  ]
	  }
	}

Note: tag is optional.

# Release a 128MB extent at offset 0 from region 0
{ "execute": "cxl-release-dynamic-capacity",

	  "arguments": {
		  "path": "/machine/peripheral/cxl-memdev0",
          "host-id":0,
          "removal-policy":"prescriptive",
          "forced-removal": false,
          "sanitize-on-release": false,
          "region": 0,
          "tag": "",
		  "extents": [
		  {
			  "offset": 0,
			  "len": 134217728
		  }
		  ]
	  }
	}

Note: removal-policy, sanitize-on-release and tag are optional.

Other changes include,
1. Applied tags to patches.
2. Replaced error_setq with error_append_hint for cxl_create_dc_region error case in Patch 6 (Patch 4 in v7); (Zhijian Li)
3. Updated the error message to include region size information in cxl_create_dc_region.
4. set range1_size_hi to 0 for DCD in build_dvsec. (Jonathan)
5. Several minor format fixes.

Thanks Markus, Jonathan, Gregory, and Zhijian for reviewing v7 and svetly Todorov for testing v7.

This series pass the same tests as v7 check the cover letter of v7 for more details. Additionally, we tested the QAPI interface for adding/releasing DC extents with optional input parameters.

v7: https://lore.kernel.org/linux-cxl/[email protected]/T/#mec4c85022ce28c80b241aaf2d5431cadaa45f097

Fan Ni (12):
hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output
payload of identify memory device command
hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative
and mailbox command support
include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for
type3 memory devices
hw/mem/cxl_type3: Add support to create DC regions to type3 memory
devices
hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr
size instead of mr as argument
hw/mem/cxl_type3: Add host backend and address space handling for DC
regions
hw/mem/cxl_type3: Add DC extent list representative and get DC extent
list mailbox support
hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release
dynamic capacity response
hw/cxl/events: Add qmp interfaces to add/release dynamic capacity
extents
hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support hw/mem/cxl_type3: Allow to release extent superset in QMP interface

Gregory Price (2):
hw/cxl/mailbox: change CCI cmd set structure to be a member, not a
reference
hw/cxl/mailbox: interface to add CCI commands to an existing CCI

 hw/cxl/cxl-mailbox-utils.c  | 658 +++++++++++++++++++++++++++++++++++-
 hw/mem/cxl_type3.c          | 634 ++++++++++++++++++++++++++++++++--
 hw/mem/cxl_type3_stubs.c    |  25 ++
 include/hw/cxl/cxl_device.h |  85 ++++-
 include/hw/cxl/cxl_events.h |  18 +
 qapi/cxl.json               | 143 ++++++++
 6 files changed, 1511 insertions(+), 52 deletions(-)
Signature · 1 line
2.43.0