diff options
| author | Fan Ni <fan.ni@samsung.com> | 2025-07-14 18:44:57 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-15 02:56:40 -0400 |
| commit | fe63feb7e8f2d62621008fdf7c884f3573de249b (patch) | |
| tree | b8c29369f9842d044e61fea629254628a9cbc77b /hw/mem | |
| parent | 98f030e7c9b4ac42e886b140899f7ae12ab4f028 (diff) | |
| download | focaccia-qemu-fe63feb7e8f2d62621008fdf7c884f3573de249b.tar.gz focaccia-qemu-fe63feb7e8f2d62621008fdf7c884f3573de249b.zip | |
hw/cxl: fix DC extent capacity tracking
Per cxl r3.2 Section 9.13.3.3, extent capacity tracking should include extents in different states including added, pending, etc. Before the change, for the in-device extent number tracking purpose, we only have "total_extent_count" defined, which only tracks the number of extents accepted. However, we need to track number of extents in other states also, for now it is extents pending-to-add. To fix that, we introduce a new counter for dynamic capacity "nr_extents_accepted" which explicitly tracks number of the extents accepted by the hosts, and fix "total_extent_count" to include both accepted and pending extents counting. Signed-off-by: Fan Ni <fan.ni@samsung.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20250714174509.1984430-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/mem')
| -rw-r--r-- | hw/mem/cxl_type3.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 94e7274912..f283178d88 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem/cxl_type3.c @@ -2076,6 +2076,7 @@ static void qmp_cxl_process_dynamic_capacity_prescriptive(const char *path, } if (group) { cxl_extent_group_list_insert_tail(&dcd->dc.extents_pending, group); + dcd->dc.total_extent_count += num_extents; } /* |