qemu/include
Fan Ni d0b9b28a5b hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents
To simulate FM functionalities for initiating Dynamic Capacity Add
(Opcode 5604h) and Dynamic Capacity Release (Opcode 5605h) as in CXL spec
r3.1 7.6.7.6.5 and 7.6.7.6.6, we implemented two QMP interfaces to issue
add/release dynamic capacity extents requests.

With the change, we allow to release an extent only when its DPA range
is contained by a single accepted extent in the device. That is to say,
extent superset release is not supported yet.

1. Add dynamic capacity extents:

For example, the command to add two continuous extents (each 128MiB long)
to region 0 (starting at DPA offset 0) looks like below:

{ "execute": "qmp_capabilities" }

{ "execute": "cxl-add-dynamic-capacity",
  "arguments": {
      "path": "/machine/peripheral/cxl-dcd0",
      "host-id": 0,
      "selection-policy": "prescriptive",
      "region": 0,
      "extents": [
      {
          "offset": 0,
          "len": 134217728
      },
      {
          "offset": 134217728,
          "len": 134217728
      }
      ]
  }
}

2. Release dynamic capacity extents:

For example, the command to release an extent of size 128MiB from region 0
(DPA offset 128MiB) looks like below:

{ "execute": "cxl-release-dynamic-capacity",
  "arguments": {
      "path": "/machine/peripheral/cxl-dcd0",
      "host-id": 0,
      "removal-policy":"prescriptive",
      "region": 0,
      "extents": [
      {
          "offset": 134217728,
          "len": 134217728
      }
      ]
  }
}

Tested-by: Svetly Todorov <svetly.todorov@memverge.com>
Reviewed-by: Gregory Price <gregory.price@memverge.com>
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Message-Id: <20240523174651.1089554-12-nifan.cxl@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-01 17:16:04 -04:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block block: remove separate bdrv_file_open callback 2024-06-28 14:44:51 +02:00
chardev chardev: use bool for fe_is_open 2024-01-12 13:23:48 +00:00
crypto crypto/block: drop qcrypto_block_open() n_threads argument 2024-06-10 11:05:43 +02:00
disas disas: Use translator_st to get disassembly data 2024-05-15 08:55:19 +02:00
exec exec: don't use void* in pointer arithmetic in headers 2024-06-28 14:44:51 +02:00
fpu fpu: Add conversions between bfloat16 and [u]int8 2023-09-16 14:57:15 +00:00
gdbstub gdbstub: move enums into separate header 2024-06-24 10:14:17 +01:00
hw hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents 2024-07-01 17:16:04 -04:00
io io: Introduce qio_channel_file_new_dupfd 2024-03-12 15:22:23 -04:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration migration: Remove unused VMSTATE_ARRAY_TEST() macro 2024-06-21 14:37:58 -03:00
monitor monitor: Remove obsolete stubs 2024-06-30 19:51:44 +03:00
net net: Remove receive_raw() 2024-06-04 15:14:26 +08:00
qapi include: move typeof_strip_qual to compiler.h, use it in QAPI_LIST_LENGTH() 2024-06-28 14:44:52 +02:00
qemu include: move typeof_strip_qual to compiler.h, use it in QAPI_LIST_LENGTH() 2024-06-28 14:44:52 +02:00
qom include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{, _WITH_INTERFACES} macros 2024-02-27 13:01:42 +00:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
standard-headers update-linux-headers: import linux/kvm_para.h header 2024-06-05 11:01:06 +02:00
sysemu vfio queue: 2024-06-24 21:30:34 -07:00
tcg tcg: Introduce TCG_TARGET_HAS_tst_vec 2024-05-22 19:05:21 -07:00
ui ui+display: rename is_buffer_shared() -> surface_is_allocated() 2024-06-19 12:42:03 +02:00
user user: Move 'thunk.h' from 'exec/user' to 'user' 2024-05-03 17:21:20 +02:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h Bump minimum glib version to v2.66 2024-05-14 12:46:24 +02:00
qemu-io.h
qemu-main.h ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00