[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 12/12] hw/mem/cxl_type3: Allow to release extent superset in Q
From: |
nifan . cxl |
Subject: |
[PATCH v6 12/12] hw/mem/cxl_type3: Allow to release extent superset in QMP interface |
Date: |
Mon, 25 Mar 2024 12:02:30 -0700 |
From: Fan Ni <fan.ni@samsung.com>
Before the change, the QMP interface used for add/release DC extents
only allows to release an extent whose DPA range is contained by a single
accepted extent in the device.
With the change, we relax the constraints. As long as the DPA range of
the extent is covered by accepted extents, we allow the release.
Signed-off-by: Fan Ni <fan.ni@samsung.com>
---
hw/mem/cxl_type3.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index 2628a6f50f..62c2022477 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -1935,8 +1935,7 @@ static void qmp_cxl_process_dynamic_capacity(const char
*path, CxlEventLog log,
"cannot release extent with pending DPA range");
return;
}
- if (!cxl_extents_contains_dpa_range(&dcd->dc.extents,
- dpa, len)) {
+ if (!ct3_test_region_block_backed(dcd, dpa, len)) {
error_setg(errp,
"cannot release extent with non-existing DPA
range");
return;
--
2.43.0
- [PATCH v6 02/12] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support, (continued)
- [PATCH v6 02/12] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support, nifan . cxl, 2024/03/25
- [PATCH v6 03/12] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices, nifan . cxl, 2024/03/25
- [PATCH v6 04/12] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices, nifan . cxl, 2024/03/25
- [PATCH v6 05/12] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argument, nifan . cxl, 2024/03/25
- [PATCH v6 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions, nifan . cxl, 2024/03/25
- [PATCH v6 07/12] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support, nifan . cxl, 2024/03/25
- [PATCH v6 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response, nifan . cxl, 2024/03/25
- [PATCH v6 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents, nifan . cxl, 2024/03/25
- [PATCH v6 10/12] hw/mem/cxl_type3: Add dpa range validation for accesses to DC regions, nifan . cxl, 2024/03/25
- [PATCH v6 11/12] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support, nifan . cxl, 2024/03/25
- [PATCH v6 12/12] hw/mem/cxl_type3: Allow to release extent superset in QMP interface,
nifan . cxl <=