From 69798d000b95a147f73dfce8c80cff92aa929dcb Mon Sep 17 00:00:00 2001 From: Anisa Su Date: Mon, 14 Jul 2025 18:45:02 +0100 Subject: hw/mem: cxl_type3: Add DC Region bitmap lock Add a lock on the bitmap of each CXLDCRegion in preparation for the next patch which implements FMAPI Set DC Region Configuration. This command can modify the block size, which means the region's bitmap must be updated accordingly. The lock becomes necessary when commands that add/release extents (meaning they update the bitmap too) are enabled on a different CCI than the CCI on which the FMAPI commands are enabled. Reviewed-by: Fan Ni Signed-off-by: Anisa Su Signed-off-by: Jonathan Cameron Message-Id: <20250714174509.1984430-7-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/cxl/cxl_device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_device.h index 7e0a669..42ae5b7 100644 --- a/include/hw/cxl/cxl_device.h +++ b/include/hw/cxl/cxl_device.h @@ -540,6 +540,7 @@ typedef struct CXLDCRegion { uint8_t flags; unsigned long *blk_bitmap; uint64_t supported_blk_size_bitmask; + QemuMutex bitmap_lock; /* Following bools make up dsmas flags, as defined in the CDAT */ bool nonvolatile; bool sharable; -- cgit v1.1