On 19/7/24 03:28, Yao Xingtao via wrote:
When injecting a new poisoned region through qmp_cxl_inject_poison(),
the newly injected region should not overlap with existing poisoned
regions.

The current validation method does not consider the following
overlapping region:
+---+-------+---+
| a | b(a)  | a |
+---+-------+---+

(a is a newly added region, b is an existing region, and b is a
  subregion of a)


Cc: qemu-sta...@nongnu.org
Fixes: 9547754f40 ("hw/cxl: QMP based poison injection support")

Reviewed-by: Jonathan Cameron <jonathan.came...@huwei.com>
Suggested-by: Peter Maydell <peter.mayd...@linaro.org>
Signed-off-by: Yao Xingtao <yaoxt.f...@fujitsu.com>

---
V1[1] -> V2:
  - Use ranges_overlap() to improve code readability
  - Replace the ASCII extended graph to ASCII basic in comment.

[1] 
https://lore.kernel.org/qemu-devel/20240718090753.59163-1-yaoxt.f...@fujitsu.com
---
  hw/mem/cxl_type3.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)


Reply via email to