hw/mem/cxl_type3: Add host backend and address space handling for DC regions
authorFan Ni <fan.ni@samsung.com>
Thu, 23 May 2024 17:44:48 +0000 (10:44 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Jul 2024 21:16:04 +0000 (17:16 -0400)
commit90de94612bb568117e038c6ce9edd35d17d239f9
tree5e86cd966459385496e9757eb61bab42ae41c28a
parent69e4fb569dc1602bfeef5b8c58de5f40cd5d756e
hw/mem/cxl_type3: Add host backend and address space handling for DC regions

Add (file/memory backed) host backend for DCD. All the dynamic capacity
regions will share a single, large enough host backend. Set up address
space for DC regions to support read/write operations to dynamic capacity
for DCD.

With the change, the following support is added:
1. Add a new property to type3 device "volatile-dc-memdev" to point to host
   memory backend for dynamic capacity. Currently, all DC regions share one
   host backend;
2. Add namespace for dynamic capacity for read/write support;
3. Create cdat entries for each dynamic capacity region.

Reviewed-by: Gregory Price <gregory.price@memverge.com>
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Message-Id: <20240523174651.1089554-9-nifan.cxl@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-mailbox-utils.c
hw/mem/cxl_type3.c
include/hw/cxl/cxl_device.h