diff options
author | Fan Ni <fan.ni@samsung.com> | 2024-05-23 10:44:48 -0700 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-01 17:16:04 -0400 |
commit | 90de94612bb568117e038c6ce9edd35d17d239f9 (patch) | |
tree | 5e86cd966459385496e9757eb61bab42ae41c28a /include/hw/cxl | |
parent | 69e4fb569dc1602bfeef5b8c58de5f40cd5d756e (diff) | |
download | qemu-90de94612bb568117e038c6ce9edd35d17d239f9.zip qemu-90de94612bb568117e038c6ce9edd35d17d239f9.tar.gz qemu-90de94612bb568117e038c6ce9edd35d17d239f9.tar.bz2 |
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>
Diffstat (limited to 'include/hw/cxl')
-rw-r--r-- | include/hw/cxl/cxl_device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_device.h index f7f56b4..c2c3df0 100644 --- a/include/hw/cxl/cxl_device.h +++ b/include/hw/cxl/cxl_device.h @@ -467,6 +467,14 @@ struct CXLType3Dev { uint64_t poison_list_overflow_ts; struct dynamic_capacity { + HostMemoryBackend *host_dc; + AddressSpace host_dc_as; + /* + * total_capacity is equivalent to the dynamic capability + * memory region size. + */ + uint64_t total_capacity; /* 256M aligned */ + uint8_t num_regions; /* 0-8 regions */ CXLDCRegion regions[DCD_MAX_NUM_REGION]; } dc; |