[HACK QEMU PATCH v1 1/1] hw/cxl: Fix MCTP Binding Check

2025-06-26 Thread anisa . su887
From: Anisa Su Per the spec, FMAPI commands (0x51-0x59) must be bound with MCTP_MT_CXL_FMAPI. Fix the conditions ensuring this in i2c_mctp_cxl.c and dev-mctp.c Move the opcode enum from cxl-mailbox-utils.c to cxl_mailbox.h to allow i2c_mctp_cxl.c and dev-mctp.c to use the enum instead of hardcod

[HACK QEMU PATCH v1 0/1] CXL MCTP FMAPI Binding Fix for MCTP over i2c/USB

2025-06-26 Thread anisa . su887
From: Anisa Su The FMAPI DCD Management patchset (https://lore.kernel.org/linux-cxl/20250626222743.1766404-1-anisa.su...@gmail.com/T/#t) is based on upstream, which does not include the i2c MCTP hack or the new MCTP USB support carried in Jonathan's tree. The commands are accessible upstream th

[QEMU PATCH v4 05/10] hw/cxl_type3: Add DC Region bitmap lock

2025-06-26 Thread anisa . su887
From: Anisa Su 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

[QEMU PATCH v4 07/10] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 76 ++ 1 file changed, 76 ins

[QEMU PATCH v4 06/10] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 86 hw/mem/cxl_type3.c | 6 +-- include/hw/cxl/cxl_device.h | 3 ++

[QEMU PATCH v4 10/10] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 79 ++ 1 file changed, 79 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-uti

[QEMU PATCH v4 01/10] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 59 + hw/mem/cxl_type3.c | 4 +++ include/hw/cxl/cxl_device.h | 1 + 3 f

[QEMU PATCH v4 04/10] cxl_events.h: Move definition for dynamic_capacity_uuid and enum for DC event types

2025-06-26 Thread anisa . su887
From: Anisa Su Move definition/enum to cxl_events.h for shared use in next patch Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a

[QEMU PATCH v4 08/10] hw/cxl: create helper function to create DC Event Records from extents

2025-06-26 Thread anisa . su887
From: Anisa Su Prepatory patch for following FMAPI Add/Release Patches. Refactors part of qmp_cxl_process_dynamic_capacity_prescriptive() into a helper function to create DC Event Records and insert in the event log. Moves definition for CXL_NUM_EXTENTS_SUPPORTED to cxl.h so it can be accessed b

[QEMU PATCH v4 09/10] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 106 hw/mem/cxl_type3.c | 8 +-- include/hw/cxl/cxl_device.h | 4 ++ 3 files changed, 114

[QEMU PATCH v4 00/10] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-06-26 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh commands to the device (QEMU-emulated) through MCTP messages over USB. Test Configuration:

[QEMU PATCH v4 02/10] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-06-26 Thread anisa . su887
From: Anisa Su Add booleans to DC Region struct to represent dsmas flags (defined in CDAT) in preparation for the next command, which returns the flags in the next mailbox command 0x5601. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 8 +++- include/hw/cxl

[QEMU PATCH v4 03/10] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-06-26 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 103 + 1 file changed, 103 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/

[QEMU PATCH v3 8/9] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 152 hw/mem/cxl_type3.c | 8 +- include/hw/cxl/cxl_device.h | 4 + 3 files changed, 160 in

[QEMU PATCH v3 4/9] cxl_events.h: Move definition for dynamic_capacity_uuid and enum for DC event types

2025-06-05 Thread anisa . su887
From: Anisa Su Move definition/enum to cxl_events.h for shared use in next patch Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a

[QEMU PATCH v3 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 62 ++ 1 file changed, 62 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-util

[QEMU PATCH v3 5/9] hw/cxl_type3: Add DC Region bitmap lock

2025-06-05 Thread anisa . su887
From: Anisa Su 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

[QEMU PATCH v3 6/9] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 86 hw/mem/cxl_type3.c | 6 +-- include/hw/cxl/cxl_device.h | 3 ++ include/hw/cxl/cxl_ma

[QEMU PATCH v3 0/9] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-06-05 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh commands to the device (QEMU emulated) through MCTP messages over I2C bus. To perform end-to

[QEMU PATCH v3 7/9] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 76 ++ 1 file changed, 76 ins

[QEMU PATCH v3 3/9] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 103 + 1 file changed, 103 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/

[QEMU PATCH v3 2/9] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-06-05 Thread anisa . su887
From: Anisa Su Add booleans to DC Region struct to represent dsmas flags (defined in CDAT) in preparation for the next command, which returns the flags in the next mailbox command 0x5601. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 8 +++- include/hw/cxl

[QEMU PATCH v3 1/9] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-06-05 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1. Reviewed-by: Fan Ni Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 59 + hw/mem/cxl_type3.c | 4 +++ include/hw/cxl/cxl_device.h | 1 + 3 f

[PATCH v2 03/10] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-05-07 Thread anisa . su887
From: Anisa Su Add booleans to DC Region struct to represent dsmas flags (defined in CDAT) in preparation for the next command, which returns the flags in the response. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 8 +++- include/hw/cxl/cxl_device.h | 15 +++ 2 fi

[PATCH v2 06/10] hw/cxl_type3: Add DC Region bitmap lock

2025-05-07 Thread anisa . su887
From: Anisa Su 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

[PATCH v2 07/10] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 97 hw/mem/cxl_type3.c | 2 +- include/hw/cxl/cxl_device.h | 3 ++ include/hw/cxl/cxl_mai

[PATCH v2 09/10] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 195 +++ hw/mem/cxl_type3.c | 8 +- include/hw/cxl/cxl_device.h | 4 + include/hw/cxl/cxl_op

[PATCH v2 08/10] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 75 include/hw/cxl/cxl_opcodes.h | 1 + 2 file

[PATCH v2 04/10] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 102 +++ include/hw/cxl/cxl_opcodes.h | 1 + 2 files changed, 103 insertions(+) diff --git a/hw/cxl/cxl-

[PATCH v2 00/10] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-05-07 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. It is based on the following branch: https://gitlab.com/jic23/qemu/-/tree/cxl-2025-02-20. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh co

[PATCH v2 10/10] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 56 include/hw/cxl/cxl_opcodes.h | 1 + 2 files changed, 57 insertions(+) diff --git a/hw/cxl/cxl-mai

[PATCH v2 05/10] cxl_events.h: Move definition for dynamic_capacity_uuid and enum for DC event types

2025-05-07 Thread anisa . su887
From: Anisa Su Move definition/enum to cxl_events.h for shared use in next patch Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/mem/cxl_type3.c b

[PATCH v2 02/10] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 56 hw/cxl/i2c_mctp_cxl.c| 6 ++-- hw/mem/cxl_type3.c | 4 +++ include/hw/cxl/cxl_

[PATCH v2 01/10] cxl-mailbox-utils: Move opcodes enum to new header file

2025-05-07 Thread anisa . su887
From: Anisa Su In preparation for the next patch, move opcodes enum to new cxl_opcodes.h file for visibility from mailbox-utils.c and i2c_mctp_cxl.c, which checks that certain command sets are bound with the correct MCTP binding. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 68 ++

[PATCH 7/9] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 84 ++ 1 file changed, 84 insertions(+) diff --gi

[PATCH 3/9] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-03-17 Thread anisa . su887
From: Anisa Su Add dsmas_flags field to DC Region struct in preparation for next command, which returns the dsmas flags in the response. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 2 ++ include/hw/cxl/cxl_device.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/mem/cxl_

[PATCH 6/9] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 100 +++ hw/mem/cxl_type3.c | 2 +- include/hw/cxl/cxl_device.h | 3 ++ include/hw/cxl/cxl_m

[PATCH 8/9] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 173 hw/mem/cxl_type3.c | 8 +- include/hw/cxl/cxl_device.h | 4 + 3 files changed, 181 in

[PATCH 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 94 ++ 1 file changed, 94 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-util

[PATCH 0/9] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-03-17 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. It is based on the following branch: https://gitlab.com/jic23/qemu/-/tree/cxl-2025-02-20. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh co

[PATCH 4/9] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-uti

[PATCH 1/9] cxl/type3: Add supported block sizes bitmask to CXLDCRegion struct

2025-03-17 Thread anisa . su887
From: Anisa Su Add supported_blk_size field to CXLDCRegion struct in preparation for next patch. It is needed by command 0x5600 Get DC Region Config. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 3 +++ include/hw/cxl/cxl_device.h | 1 + 2 files changed, 4 insertions(+) diff --git

[PATCH 5/9] cxl_events.h: move definition for dynamic_capacity_uuid and enum for DC event types

2025-03-17 Thread anisa . su887
From: Anisa Su move definition for dynamic_capacity_uuid and enum for DC event types to cxl_events.h from cxl_type3.c for shared use in next patch Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15

[PATCH 2/9] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-03-17 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 67 ++ hw/cxl/i2c_mctp_cxl.c | 6 +++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git