[PATCH v2 0/3] hw/cxl: Add fixes in maintenance, PPR and event records

shiju.jose--- via qemu development posted 3 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260306101423.986-1-shiju.jose@huawei.com
Maintainers: Jonathan Cameron <jonathan.cameron@huawei.com>, Fan Ni <fan.ni@samsung.com>
hw/cxl/cxl-mailbox-utils.c |  6 ++++--
hw/mem/cxl_type3.c         | 13 ++++---------
2 files changed, 8 insertions(+), 11 deletions(-)
[PATCH v2 0/3] hw/cxl: Add fixes in maintenance, PPR and event records
Posted by shiju.jose--- via qemu development 1 month, 1 week ago
From: Shiju Jose <shiju.jose@huawei.com>

Add few fixes in CXL maintenance, PPR and event records generation.

1. In cxl_create_mem_sparing_event_records(), replace strncpy with memcpy
to solve coverity warning (CID 1645325) to copy the entire component ID
data, which is 16 bytes data, not a string.

2. In cxl_maintenance_insert(),
 - replace strncpy with memcpy to copy full data because component ID is
   16 bytes data, not a string.
 - remove memset which is not required.

3. In cxl_perform_ppr(), remove and free the maintenance entry from QLIST
if match is found and PPR operation is performed.

4. Component ID in CXL events is 16 bytes data, not a string, but event
record generation copy 15 bytes only from the qmp "component-id" field
using strncpy. Replace strncpy with memcpy and copy the entire component
ID data.

Changes:
v1 -> v2
1. Fix for the feedback from Jonathan.
  - Modified title of patch[1] & patch[3].
  - Added fixes tags to all 3 patche's header.

Shiju Jose (3):
  hw/cxl: Fix handling of component ID to not assume it is a string
  hw/cxl: Add fixes in Post Package Repair (PPR)
  hw/cxl/events: Fix handling of component ID in event records
    generation to not assume it is a string

 hw/cxl/cxl-mailbox-utils.c |  6 ++++--
 hw/mem/cxl_type3.c         | 13 ++++---------
 2 files changed, 8 insertions(+), 11 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/3] hw/cxl: Add fixes in maintenance, PPR and event records
Posted by Jonathan Cameron via qemu development 3 weeks, 5 days ago
On Fri, 6 Mar 2026 10:14:19 +0000
<shiju.jose@huawei.com> wrote:

> From: Shiju Jose <shiju.jose@huawei.com>
> 
> Add few fixes in CXL maintenance, PPR and event records generation.
All 3 of these look good to me.

Michael, please pick these up directly (assuming you think
they look good as well1)


Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

Thanks,

Jonathan

> 
> 1. In cxl_create_mem_sparing_event_records(), replace strncpy with memcpy
> to solve coverity warning (CID 1645325) to copy the entire component ID
> data, which is 16 bytes data, not a string.
> 
> 2. In cxl_maintenance_insert(),
>  - replace strncpy with memcpy to copy full data because component ID is
>    16 bytes data, not a string.
>  - remove memset which is not required.
> 
> 3. In cxl_perform_ppr(), remove and free the maintenance entry from QLIST
> if match is found and PPR operation is performed.
> 
> 4. Component ID in CXL events is 16 bytes data, not a string, but event
> record generation copy 15 bytes only from the qmp "component-id" field
> using strncpy. Replace strncpy with memcpy and copy the entire component
> ID data.
> 
> Changes:
> v1 -> v2
> 1. Fix for the feedback from Jonathan.
>   - Modified title of patch[1] & patch[3].
>   - Added fixes tags to all 3 patche's header.
> 
> Shiju Jose (3):
>   hw/cxl: Fix handling of component ID to not assume it is a string
>   hw/cxl: Add fixes in Post Package Repair (PPR)
>   hw/cxl/events: Fix handling of component ID in event records
>     generation to not assume it is a string
> 
>  hw/cxl/cxl-mailbox-utils.c |  6 ++++--
>  hw/mem/cxl_type3.c         | 13 ++++---------
>  2 files changed, 8 insertions(+), 11 deletions(-)
>