Skip to contentSkip to conversation

hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents

PATCH In review [email protected] 2 participants 2 messages Oct 15, 2024 – Oct 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents

From: Fan Ni <[email protected]>

In the function of retrieving DC extents (cmd_dcd_get_dyn_cap_ext_list), the output buffer index was not correctly updated while iterating the extent list on the device, leaving the extents returned incorrect except for the first one.

Fixes 1c9221f19e ("hw/mem/cxl_type3: Add DC extent list representative ...")
---
 hw/cxl/cxl-mailbox-utils.c | 1 +
 1 file changed, 1 insertion(+)
hw/cxl/cxl-mailbox-utils.c +1 -0
index c82ad50ac8..58f8930272 100644
@@ -2233,6 +2233,7 @@ static CXLRetCode cmd_dcd_get_dyn_cap_ext_list(const struct cxl_cmd *cmd,
             stw_le_p(&out_rec->shared_seq, ent->shared_seq);
 
             record_done++;
+            out_rec++;
             if (record_done == record_count) {
                 break;
             }
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · On Tue, 15 Oct 2024 11:51:26 -0700 [email protected] wrote:

From: Fan Ni <[email protected]>

In the function of retrieving DC extents (cmd_dcd_get_dyn_cap_ext_list), the output buffer index was not correctly updated while iterating the extent list on the device, leaving the extents returned incorrect except for the first one.

Fixes 1c9221f19e ("hw/mem/cxl_type3: Add DC extent list representative ...")

I'll queue this up alongside that other fix.

thanks,

Jonathan
p.s. I'm having some issues with the list servers bouncing my emails so this may not reach the list.

Quoted 16 lines
---
 hw/cxl/cxl-mailbox-utils.c | 1 +
 1 file changed, 1 insertion(+)
hw/cxl/cxl-mailbox-utils.c +1 -0
index c82ad50ac8..58f8930272 100644
@@ -2233,6 +2233,7 @@ static CXLRetCode cmd_dcd_get_dyn_cap_ext_list(const struct cxl_cmd *cmd,
             stw_le_p(&out_rec->shared_seq, ent->shared_seq);
 
             record_done++;
+            out_rec++;
             if (record_done == record_count) {
                 break;
             }