summary refs log tree commit diff stats
path: root/hw/mem
diff options
context:
space:
mode:
authorAnisa Su <anisa.su@samsung.com>2025-07-14 18:44:58 +0100
committerMichael S. Tsirkin <mst@redhat.com>2025-07-15 02:56:40 -0400
commit9fde6eb39d8f2354c8f8da91ee6854c60929270f (patch)
tree27046bd68846b3e024444a07850544ae90764363 /hw/mem
parentfe63feb7e8f2d62621008fdf7c884f3573de249b (diff)
downloadfocaccia-qemu-9fde6eb39d8f2354c8f8da91ee6854c60929270f.tar.gz
focaccia-qemu-9fde6eb39d8f2354c8f8da91ee6854c60929270f.zip
hw/cxl: mailbox-utils: 0x5600 - FMAPI Get DCD Info
FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1.

Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Anisa Su <anisa.su@samsung.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20250714174509.1984430-3-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index f283178d88..d898cfd617 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem/cxl_type3.c
@@ -8,6 +8,7 @@
  *
  * SPDX-License-Identifier: GPL-v2-only
  */
+#include <math.h>
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
@@ -634,6 +635,8 @@ static bool cxl_create_dc_regions(CXLType3Dev *ct3d, Error **errp)
     uint64_t region_len;
     uint64_t decode_len;
     uint64_t blk_size = 2 * MiB;
+    /* Only 1 block size is supported for now. */
+    uint64_t supported_blk_size_bitmask = blk_size;
     CXLDCRegion *region;
     MemoryRegion *mr;
     uint64_t dc_size;
@@ -679,6 +682,7 @@ static bool cxl_create_dc_regions(CXLType3Dev *ct3d, Error **errp)
             .block_size = blk_size,
             /* dsmad_handle set when creating CDAT table entries */
             .flags = 0,
+            .supported_blk_size_bitmask = supported_blk_size_bitmask,
         };
         ct3d->dc.total_capacity += region->len;
         region->blk_bitmap = bitmap_new(region->len / region->block_size);