aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorFan Ni <fan.ni@samsung.com>2024-05-23 10:44:54 -0700
committerMichael S. Tsirkin <mst@redhat.com>2024-07-01 17:16:04 -0400
commitc51dca04281f9be6eacdad8fc8f9c7ddc87dcf3c (patch)
tree6bca138bf2a1a3dd30cad1d990d5f09c138f1b63 /hw
parent3083f018b59fd35b9ee993715694f967c49afeb1 (diff)
downloadqemu-c51dca04281f9be6eacdad8fc8f9c7ddc87dcf3c.zip
qemu-c51dca04281f9be6eacdad8fc8f9c7ddc87dcf3c.tar.gz
qemu-c51dca04281f9be6eacdad8fc8f9c7ddc87dcf3c.tar.bz2
hw/mem/cxl_type3: Allow to release extent superset in QMP interface
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. Tested-by: Svetly Todorov <svetly.todorov@memverge.com> Reviewed-by: Gregory Price <gregory.price@memverge.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Fan Ni <fan.ni@samsung.com> Message-Id: <20240523174651.1089554-15-nifan.cxl@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/mem/cxl_type3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index 0d18259..5d4a127 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -1947,7 +1947,7 @@ static void qmp_cxl_process_dynamic_capacity_prescriptive(const char *path,
"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;