qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [QEMU PATCH] hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents
@ 2024-10-15 18:51 nifan.cxl
  2024-10-17 13:08 ` Jonathan Cameron via
  0 siblings, 1 reply; 2+ messages in thread
From: nifan.cxl @ 2024-10-15 18:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: jonathan.cameron, linux-cxl, ira.weiny, dan.j.williams,
	a.manzanares, dave, nmtadam.samsung, nifan.cxl, Fan Ni

From: Fan Ni <fan.ni@samsung.com>

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 ...")
Signed-off-by: Fan Ni <fan.ni@samsung.com>
---
 hw/cxl/cxl-mailbox-utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
index c82ad50ac8..58f8930272 100644
--- a/hw/cxl/cxl-mailbox-utils.c
+++ b/hw/cxl/cxl-mailbox-utils.c
@@ -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;
             }
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [QEMU PATCH] hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents
  2024-10-15 18:51 [QEMU PATCH] hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents nifan.cxl
@ 2024-10-17 13:08 ` Jonathan Cameron via
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron via @ 2024-10-17 13:08 UTC (permalink / raw)
  To: nifan.cxl
  Cc: qemu-devel, linux-cxl, ira.weiny, dan.j.williams, a.manzanares,
	dave, nmtadam.samsung, Fan Ni

On Tue, 15 Oct 2024 11:51:26 -0700
nifan.cxl@gmail.com wrote:

> From: Fan Ni <fan.ni@samsung.com>
> 
> 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 ...")
> Signed-off-by: Fan Ni <fan.ni@samsung.com>
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.

> ---
>  hw/cxl/cxl-mailbox-utils.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
> index c82ad50ac8..58f8930272 100644
> --- a/hw/cxl/cxl-mailbox-utils.c
> +++ b/hw/cxl/cxl-mailbox-utils.c
> @@ -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;
>              }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-17 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 18:51 [QEMU PATCH] hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents nifan.cxl
2024-10-17 13:08 ` Jonathan Cameron via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).