Re: [PATCH qemu 07/11] hw/cxl: mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-07-14 Thread Fan Ni
00 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Wed, Jul 02, 2025 at 05:02:13PM +0100, Jonathan Cameron wrote: > > > > > From: Anisa Su > > > > > > > > > > FM DCD Management command 0x5602 implemented p

Re: [PATCH qemu 11/11] hw/cxl: mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-07-03 Thread Fan Ni
On Wed, Jul 02, 2025 at 05:02:17PM +0100, Jonathan Cameron wrote: > 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 > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni >

Re: [PATCH qemu 10/11] hw/cxl: mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-07-03 Thread Fan Ni
On Wed, Jul 02, 2025 at 05:02:16PM +0100, Jonathan Cameron wrote: > 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 > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni Only a

Re: [PATCH qemu 09/11] hw/cxl: Create helper function to create DC Event Records from extents

2025-07-03 Thread Fan Ni
n the event log. > > Moves definition for CXL_NUM_EXTENTS_SUPPORTED to cxl.h so it can be > accessed by cxl-mailbox-utils.c and cxl-events.c, where the helper > function is defined. > > Signed-off-by: Anisa Su > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan N

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

2025-07-02 Thread Fan Ni
md_set_fm_dcd[256][256] = { > CXL_MBOX_CONFIG_CHANGE_CXL_RESET | > CXL_MBOX_IMMEDIATE_CONFIG_CHANGE | > CXL_MBOX_IMMEDIATE_DATA_CHANGE) }, > +[FMAPI_DCD_MGMT][INITIATE_DC_RELEASE] = { "INIT_DC_RELEASE", > +cmd_fm_initiate_dc_release, ~0, > +(CXL_MBOX_CONFIG_CHANGE_COLD_RESET | > + CXL_MBOX_CONFIG_CHANGE_CONV_RESET | > + CXL_MBOX_CONFIG_CHANGE_CXL_RESET | > + CXL_MBOX_IMMEDIATE_CONFIG_CHANGE | > + CXL_MBOX_IMMEDIATE_DATA_CHANGE) }, > }; > > /* > -- > 2.47.2 > -- Fan Ni (From gmail)

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

2025-07-02 Thread Fan Ni
dpa, uint64_t len) > { > CXLDCExtentGroup *group; > > diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_device.h > index 91ec1ba299..7be68d98c6 100644 > --- a/include/hw/cxl/cxl_device.h > +++ b/include/hw/cxl/cxl_device.h > @@ -736,4 +736,8 @@ void cxl_create_dc_event_records_for_extents(CXLType3Dev > *ct3d, > CXLDCEventType type, > CXLDCExtentRaw extents[], > uint32_t ext_count); > +bool cxl_extents_overlaps_dpa_range(CXLDCExtentList *list, > +uint64_t dpa, uint64_t len); > +bool cxl_extent_groups_overlaps_dpa_range(CXLDCExtentGroupList *list, > + uint64_t dpa, uint64_t len); > #endif > -- > 2.47.2 > -- Fan Ni (From gmail)

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

2025-07-02 Thread Fan Ni
n the event log. > > Moves definition for CXL_NUM_EXTENTS_SUPPORTED to cxl.h so it can be > accessed by cxl-mailbox-utils.c and cxl-events.c, where the helper > function is defined. > > Signed-off-by: Anisa Su Reviewed-by: Fan Ni > ---

Re: [PATCH v8 00/14] Enabling DCD emulation support in Qemu

2025-06-26 Thread Fan Ni
On Wed, Jun 25, 2025 at 03:22:34PM +0100, Alireza Sanaee wrote: > On Thu, 23 May 2024 10:44:40 -0700 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > A git tree of this series can be found here (with one extra commit on > > top for printing out accepte

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

2025-06-06 Thread Fan Ni
On Fri, Jun 06, 2025 at 11:43:51AM -0700, Fan Ni wrote: > On Thu, Jun 05, 2025 at 11:42:23PM +, anisa.su...@gmail.com wrote: > > From: Anisa Su > > > > FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section > > 7.6.7.6.6 > > > >

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

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:23PM +, anisa.su...@gmail.com wrote: > 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 See below .. > --- > hw/cxl/cxl-mailbox-utils.c | 62

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

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:22PM +, anisa.su...@gmail.com wrote: > 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 See below... > --- > hw/cxl/cxl-mailbox-utils.c | 152 +

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

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:20PM +, anisa.su...@gmail.com wrote: > 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 > --- One minor comment, otherwise LGTM. > hw/cxl/cxl-mailbox-utils.c | 86 +++

Re: [PATCH qemu] hw/cxl: Fix register block locator size

2025-05-29 Thread Fan Ni
; > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/cxl/cxl_pci.h b/include/hw/cxl/cxl_pci.h > index d0855ed78b..3bb882ce89 100644 > --- a/include/hw/cxl/

Re: [PATCH] hw/cxl: fix DC extent capacity tracking

2025-05-28 Thread Fan Ni
On Tue, May 20, 2025 at 12:56:43PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Per cxl r3.2 Section 9.13.3.3, extent capacity tracking should include > extents in different states including added, pending, etc. > > Before the change, for the in-device extent number tr

Re: [PATCH] Add support for FMAPI Get Mutliheaded Head info opcode (5501h)

2025-05-22 Thread Fan Ni
On Thu, May 22, 2025 at 12:01:35PM +0530, Vinayak Holikatti wrote: > CXL spec 3.2 section 7.6.7.5.2 describes Get Head Info. > > Signed-off-by: Vinayak Holikatti > --- > This patch is generated against Jonathan Cameron's branch cxl-2025-03-20 > > hw/cxl/cxl-mailbox-utils.c | 21 + > h

Re: [PATCH v13 2/5] hw/cxl: Make the CXL fixed memory windows devices.

2025-05-21 Thread Fan Ni
+{ > > +type_register_static(&cxl_fmw_info); > > +} > > +type_init(cxl_host_register_types) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > index 70656157ca..9978398876 100644 > > --- a/hw/i386/pc.c > > +++ b/hw/i386/pc.c > > @@ -630,7 +630,7 @@ void pc_machine_done(Notifier *notifier, void *data) > > &error_fatal); > > > > if (pcms->cxl_devices_state.is_enabled) { > > -cxl_fmws_link_targets(&pcms->cxl_devices_state, &error_fatal); > > +cxl_fmws_link_targets(&error_fatal); > > } > > > > /* set the number of CPUs */ > > @@ -739,20 +739,28 @@ static uint64_t pc_get_cxl_range_start(PCMachineState > > *pcms) > > return cxl_base; > > } > > > > -static uint64_t pc_get_cxl_range_end(PCMachineState *pcms) > > +static int cxl_get_fmw_end(Object *obj, void *opaque) > > { > > -uint64_t start = pc_get_cxl_range_start(pcms) + MiB; > > +struct CXLFixedWindow *fw; > > +uint64_t *start = opaque; > > > > -if (pcms->cxl_devices_state.fixed_windows) { > > -GList *it; > > - > > -start = ROUND_UP(start, 256 * MiB); > > -for (it = pcms->cxl_devices_state.fixed_windows; it; it = > > it->next) { > > -CXLFixedWindow *fw = it->data; > > -start += fw->size; > > -} > > +if (!object_dynamic_cast(obj, TYPE_CXL_FMW)) { > > +return 0; > > } > > +fw = CXL_FMW(obj); > > + > > +*start += fw->size; > > > > +return 0; > > +} > > + > > +static uint64_t pc_get_cxl_range_end(PCMachineState *pcms) > > +{ > > +uint64_t start = pc_get_cxl_range_start(pcms) + MiB; > > + > > +/* Ordering doesn't matter so no need to build a sorted list */ > > +object_child_foreach_recursive(object_get_root(), cxl_get_fmw_end, > > + &start); > > return start; > > } > > > > @@ -954,23 +962,10 @@ void pc_memory_init(PCMachineState *pcms, > > cxl_base = pc_get_cxl_range_start(pcms); > > memory_region_init(mr, OBJECT(machine), "cxl_host_reg", cxl_size); > > memory_region_add_subregion(system_memory, cxl_base, mr); > > -cxl_resv_end = cxl_base + cxl_size; > > -if (pcms->cxl_devices_state.fixed_windows) { > > -hwaddr cxl_fmw_base; > > -GList *it; > > - > > -cxl_fmw_base = ROUND_UP(cxl_base + cxl_size, 256 * MiB); > > -for (it = pcms->cxl_devices_state.fixed_windows; it; it = > > it->next) { > > -CXLFixedWindow *fw = it->data; > > - > > -fw->base = cxl_fmw_base; > > -memory_region_init_io(&fw->mr, OBJECT(machine), > > &cfmws_ops, fw, > > - "cxl-fixed-memory-region", fw->size); > > -memory_region_add_subregion(system_memory, fw->base, > > &fw->mr); > > -cxl_fmw_base += fw->size; > > -cxl_resv_end = cxl_fmw_base; > > -} > > -} > > +cxl_base = ROUND_UP(cxl_base + cxl_size, 256 * MiB); > > + > > +cxl_resv_end = cxl_fmws_set_memmap_and_update_mmio(cxl_base, > > + maxphysaddr); > > } > > > > /* Initialize PC system firmware */ -- Fan Ni (From gmail)

Re: [PATCH v13 1/5] hw/cxl-host: Add an index field to CXLFixedMemoryWindow

2025-05-21 Thread Fan Ni
ff-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl.h | 1 + > hw/cxl/cxl-host.c| 9 ++--- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/include/hw/cxl/cxl.h b/include/hw/cxl/cxl.h > index 75e47b6864..b2bcce7ed6 100644 > ---

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

2025-05-20 Thread Fan Ni
t; +++ b/include/hw/cxl/cxl_device.h > @@ -824,4 +824,8 @@ bool ct3_test_region_block_backed(CXLType3Dev *ct3d, > uint64_t dpa, > void cxl_assign_event_header(CXLEventRecordHdr *hdr, > const QemuUUID *uuid, uint32_t flags, > uint8_t length, uint64_t timestamp); > +bool cxl_extents_overlaps_dpa_range(CXLDCExtentList *list, > +uint64_t dpa, uint64_t len); > +bool cxl_extent_groups_overlaps_dpa_range(CXLDCExtentGroupList *list, > + uint64_t dpa, uint64_t len); > #endif > diff --git a/include/hw/cxl/cxl_opcodes.h b/include/hw/cxl/cxl_opcodes.h > index ad4e614daa..72ea0a7d44 100644 > --- a/include/hw/cxl/cxl_opcodes.h > +++ b/include/hw/cxl/cxl_opcodes.h > @@ -66,5 +66,6 @@ enum { > #define GET_HOST_DC_REGION_CONFIG 0x1 > #define SET_DC_REGION_CONFIG 0x2 > #define GET_DC_REGION_EXTENT_LIST 0x3 > +#define INITIATE_DC_ADD 0x4 > GLOBAL_MEMORY_ACCESS_EP_MGMT = 0X59 > }; > -- > 2.47.2 > -- Fan Ni

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

2025-05-20 Thread Fan Ni
On Thu, May 08, 2025 at 12:01:04AM +, anisa.su...@gmail.com wrote: > 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

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

2025-05-20 Thread Fan Ni
6,11 @@ > #define CXL_MBOX_SECURITY_STATE_CHANGE (1 << 5) > #define CXL_MBOX_BACKGROUND_OPERATION (1 << 6) > #define CXL_MBOX_BACKGROUND_OPERATION_ABORT (1 << 7) > +#define CXL_MBOX_SECONDARY_MBOX_SUPPORTED (1 << 8) > +#define CXL_MBOX_REQUEST_ABORT_BACKGROUND_OP_SUPPORTED (1 << 9) > +#define CXL_MBOX_CEL_10_TO_11_VALID (1 << 10) > +#define CXL_MBOX_CONFIG_CHANGE_CONV_RESET (1 << 11) > +#define CXL_MBOX_CONFIG_CHANGE_CXL_RESET (1 << 12) > > #define CXL_LOG_CAP_CLEAR_SUPPORTED (1 << 0) > #define CXL_LOG_CAP_POPULATE_SUPPORTED (1 << 1) > diff --git a/include/hw/cxl/cxl_opcodes.h b/include/hw/cxl/cxl_opcodes.h > index 68ad68291c..ed4be23b75 100644 > --- a/include/hw/cxl/cxl_opcodes.h > +++ b/include/hw/cxl/cxl_opcodes.h > @@ -64,5 +64,6 @@ enum { > FMAPI_DCD_MGMT = 0x56, > #define GET_DCD_INFO 0x0 > #define GET_HOST_DC_REGION_CONFIG 0x1 > +#define SET_DC_REGION_CONFIG 0x2 > GLOBAL_MEMORY_ACCESS_EP_MGMT = 0X59 > }; > -- > 2.47.2 > -- Fan Ni

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

2025-05-20 Thread Fan Ni
touch the blk_bitmap to ensure the range to access is backed by DC blocks through ct3_test_region_block_backed(). Otherwise, Reviewed-by: Fan Ni > > Signed-off-by: Anisa Su > --- > hw/mem/cxl_type3.c | 4 > include/hw/cxl/cxl_device.h | 1 + > 2 files change

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

2025-05-20 Thread Fan Ni
On Thu, May 08, 2025 at 12:01:01AM +, anisa.su...@gmail.com wrote: > From: Anisa Su > > Move definition/enum to cxl_events.h for shared use in next patch > > Signed-off-by: Anisa Su > --- Reviewed-by: Fan Ni > hw/mem/cxl_type3.c | 15

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

2025-05-20 Thread Fan Ni
On Thu, May 08, 2025 at 12:01:00AM +, anisa.su...@gmail.com wrote: > 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 One minor comment inline. Otherwise, Reviewed-by: Fan Ni > ---

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

2025-05-20 Thread Fan Ni
/, otherwise Reviewed-by: Fan Ni > response. > > Signed-off-by: Anisa Su > --- > hw/mem/cxl_type3.c | 8 +++- > include/hw/cxl/cxl_device.h | 15 +++ > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/hw/mem/cxl_type3.c

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

2025-05-20 Thread Fan Ni
On Thu, May 08, 2025 at 12:00:58AM +, anisa.su...@gmail.com wrote: > 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 LGTM. minor comments inline. Reviewed-by: Fan Ni > --- > hw

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

2025-05-20 Thread Fan Ni
#define GET_SCAN_MEDIA_CAPABILITIES 0x3 > +#define SCAN_MEDIA 0x4 > +#define GET_SCAN_MEDIA_RESULTS 0x5 > +DCD_CONFIG = 0x48, > +#define GET_DC_CONFIG 0x0 > +#define GET_DYN_CAP_EXT_LIST 0x1 > +#define ADD_DYN_CAP_RSP0x2 > +#define RELEASE_DYN_CAP0x3 > +PHYSICAL_SWITCH = 0x51, > +#define IDENTIFY_SWITCH_DEVICE 0x0 > +#define GET_PHYSICAL_PORT_STATE 0x1 > +TUNNEL = 0x53, > +#define MANAGEMENT_COMMAND 0x0 > +MHD = 0x55, > +#define GET_MHD_INFO 0x0 > +}; > -- > 2.47.2 > -- Fan Ni

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

2025-05-02 Thread Fan Ni
On Fri, May 02, 2025 at 10:01:55AM +0100, Jonathan Cameron wrote: > On Thu, 1 May 2025 20:21:56 + > Fan Ni wrote: > > > On Thu, Apr 24, 2025 at 11:42:59AM +0100, Jonathan Cameron wrote: > > > On Mon, 17 Mar 2025 16:31:30 + > > > anisa.su...@gmail.com wr

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

2025-05-01 Thread Fan Ni
On Thu, Apr 24, 2025 at 11:42:59AM +0100, Jonathan Cameron wrote: > On Mon, 17 Mar 2025 16:31:30 + > anisa.su...@gmail.com wrote: > > > From: Anisa Su > > > > Add dsmas_flags field to DC Region struct in preparation for next > > command, which returns the dsmas flags in the response. > > >

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

2025-04-28 Thread Fan Ni
On Thu, Apr 24, 2025 at 12:23:08PM +0100, Jonathan Cameron wrote: > On Mon, 17 Mar 2025 16:31:36 + > anisa.su...@gmail.com wrote: > > > 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 > Similar comm

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

2025-04-28 Thread Fan Ni
On Thu, Apr 24, 2025 at 12:19:59PM +0100, Jonathan Cameron wrote: > On Mon, 17 Mar 2025 16:31:35 + > anisa.su...@gmail.com wrote: > > > 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 > > --- ... >

Re: [RFC 0/3] Qemu FM emulation

2025-04-14 Thread Fan Ni
On Tue, Apr 08, 2025 at 11:04:20AM -0400, Gregory Price wrote: > On Mon, Apr 07, 2025 at 09:20:27PM -0700, nifan@gmail.com wrote: > > From: Fan Ni > > > > The RFC provides a way for FM emulation in Qemu. The goal is to provide > > a context where we can have more F

Re: CXL memory pooling emulation inqury

2025-04-10 Thread Fan Ni
On Wed, Mar 12, 2025 at 03:33:12PM -0400, Gregory Price wrote: > On Wed, Mar 12, 2025 at 06:05:43PM +, Jonathan Cameron wrote: > > > > Longer term I remain a little unconvinced by whether this is the best > > approach > > because I also want a single management path (so fake CCI etc) and that

Re: CXL memory pooling emulation inqury

2025-03-13 Thread Fan Ni
On Wed, Mar 12, 2025 at 03:33:12PM -0400, Gregory Price wrote: > On Wed, Mar 12, 2025 at 06:05:43PM +, Jonathan Cameron wrote: > > > > Longer term I remain a little unconvinced by whether this is the best > > approach > > because I also want a single management path (so fake CCI etc) and that

Re: [PATCH 1/1] mem/cxl-type3: Add a default value of sn

2025-02-13 Thread Fan Ni
On Thu, Feb 13, 2025 at 03:09:05PM +0800, Yuquan Wang wrote: > On Tue, Feb 11, 2025 at 09:26:55AM +, Jonathan Cameron wrote: > > On Tue, 11 Feb 2025 10:24:13 +0800 > > Yuquan Wang wrote: > > > > > The previous default value of sn is UI64_NULL which would cause the > > > cookie of nd_interleav

Re: [PATCH 1/1] Added support for get/set alert configuration commands

2025-02-04 Thread Fan Ni
> +typedef struct CXLValidEnableAlerts { > +uint8_t lupwt:1; > +uint8_t dotpwt:1; > +uint8_t dutpwt:1; > +uint8_t cvmepwt:1; > +uint8_t cpmepwt:1; > +uint8_t reserved:3; > +} CXLValidEnableAlerts; > + > +typedef struct CXLAlertConfig { > +CXLValidEnableAlerts valid_alerts; > +CXLValidEnableAlerts enable_alerts; > +uint8_t lucat; > +uint8_t lupwt; > +uint16_t dotcat; > +uint16_t dutcat; > +uint16_t dotpwt; > +uint16_t dutpwt; > +uint16_t cvmepwt; > +uint16_t cpmepwt; > +} QEMU_PACKED CXLAlertConfig; > + > struct CXLType3Dev { > /* Private */ > PCIDevice parent_obj; > @@ -605,6 +627,8 @@ struct CXLType3Dev { > CXLCCI vdm_fm_owned_ld_mctp_cci; > CXLCCI ld0_cci; > > +CXLAlertConfig alert_config; > + > /* PCIe link characteristics */ > PCIExpLinkSpeed speed; > PCIExpLinkWidth width; > -- > 2.34.1 > -- Fan Ni (From gmail)

Re: [ISSUE] memdev cannot be enabled after reboot due to failed dvsec range check [QEMU setup]

2025-01-15 Thread Fan Ni
240409075846.85370-1-lizhij...@fujitsu.com/ > Hi Zhijian, Thanks for the pointer. With the fix applied, the issue goes away. Fan > > On 15/01/2025 04:30, Fan Ni wrote: > > Hi, > > > > Recently, while testing cxl with qemu setup, I found the memdev cannot > > be e

Re: [PATCH qemu] hw/cxl: Check for zero length features in cmd_features_set_feature()

2024-11-11 Thread Fan Ni
; > Reported-by: Peter Maydell > Signed-off-by: Jonathan Cameron > --- > hw/cxl/cxl-mailbox-utils.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Fan Ni > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index 2d4d62c454..ce9aa

Re: [PATCH qemu 05/10] hw/cxl: Check the length of data requested fits in get_log()

2024-11-05 Thread Fan Ni
the only possible failure would be if the mailbox itself isn't big * enough. " Not sure how it avoids the case when the offset is too large. Fan > return CXL_MBOX_INVALID_INPUT; > } > > -- > 2.43.0 > -- Fan Ni

Re: [PATCH qemu 09/10] hw/cxl: Ensure there is enough data for the header in cmd_ccls_set_lsa()

2024-11-05 Thread Fan Ni
On Fri, Nov 01, 2024 at 01:39:16PM +, Jonathan Cameron wrote: > The properties of the requested set command cannot be established if > len_in is less than the size of the header. > > Reported-by: Esifiel > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni >

Re: [PATCH qemu 10/10] hw/cxl: Ensure there is enough data to read the input header in cmd_get_physical_port_state()

2024-11-05 Thread Fan Ni
: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/cxl/cxl-mailbox-utils.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index f4a436e172..2d4d62c454 100644 > --- a/hw/cxl/cxl-mailbox-utils.c > +++ b/hw/cxl/cxl-ma

Re: [PATCH qemu 08/10] hw/cxl: Check that writes do not go beyond end of target attributes

2024-11-05 Thread Fan Ni
s used to accumulate the full feature s/fo/of/ > attribute set. Other than that, Reviewed-by: Fan Ni > > Reported-by: Esifiel > Signed-off-by: Jonathan Cameron > --- > hw/cxl/cxl-mailbox-utils.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/hw/

Re: [PATCH qemu 07/10] hw/cxl: Ensuring enough data to read parameters in cmd_tunnel_management_cmd()

2024-11-05 Thread Fan Ni
> 1 file changed, 3 insertions(+) > Reviewed-by: Fan Ni > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index 5e571955b6..a40d81219c 100644 > --- a/hw/cxl/cxl-mailbox-utils.c > +++ b/hw/cxl/cxl-mailbox-utils.c > @@ -151,6 +151,9 @@ static CXLRetC

Re: [PATCH qemu 06/10] hw/cxl: Avoid accesses beyond the end of cel_log.

2024-11-05 Thread Fan Ni
t + get_log->length >= sizeof(cci->cel_log)) > { > return CXL_MBOX_INVALID_INPUT; Oh. This patch actually addresses my concern in the previous patch. Maybe we can combine the changes in this patch and the previous one together. Other than that Reviewed-by: Fan Ni

Re: [PATCH qemu 04/10] hw/cxl: Check enough data in cmd_firmware_update_transfer()

2024-11-05 Thread Fan Ni
o avoid this. > > Reported-by: Esifiel > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/cxl/cxl-mailbox-utils.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index 3cb499a24

Re: [PATCH qemu 03/10] hw/cxl: Check input length is large enough in cmd_events_clear_records()

2024-11-05 Thread Fan Ni
located as a duplicate of the incoming message buffer. > > Reported-by: Esifiel > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/cxl/cxl-mailbox-utils.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cx

Re: [PATCH qemu 02/10] hw/cxl: Check input includes at least the header in cmd_features_set_feature()

2024-11-05 Thread Fan Ni
> Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/cxl/cxl-mailbox-utils.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index 17924410dd..e63140aefe 100644 > --- a/hw/cxl/cxl-mai

Re: [PATCH qemu 01/10] hw/cxl: Check size of input data to dynamic capacity mailbox commands

2024-11-05 Thread Fan Ni
e second > that there is enough for those elements to be accessed. > > Reported-by: Esifiel > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/hw/cxl/cxl-m

Re: [PATCH 2/6] hw/pci-bridge/cxl_upstream: Provide x-speed and x-width properties.

2024-10-29 Thread Fan Ni
nfig_write; > k->realize = cxl_dsp_realize; > k->exit = cxl_dsp_exitfn; > @@ -243,7 +241,6 @@ static const TypeInfo cxl_dsp_info = { > .name = TYPE_CXL_DSP, > .instance_size = sizeof(CXLDownstreamPort), > .parent = TYPE_PCIE_SLOT, > -.instance_post_init = cxl_dsp_instance_post_init, > .class_init = cxl_dsp_class_init, > .interfaces = (InterfaceInfo[]) { > { INTERFACE_PCIE_DEVICE }, > -- > 2.43.0 > -- Fan Ni

Re: [PATCH 1/6] hw/pci-bridge/cxl_root_port: Provide x-speed and x-width properties.

2024-10-29 Thread Fan Ni
res_reserve.mem_pref_64, > -1), > +DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot, > +speed, PCIE_LINK_SPEED_64), > +DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, > +width, PCIE_LINK_WIDTH_32), > DEFINE_PROP_END_OF_LIST() > }; LGTM. Reviewed-by: Fan Ni Fan > > -- > 2.43.0 > -- Fan Ni

Re: [QEMU RFC] hw/mem/cxl_type3: add guard to avoid event log overflow during a DC extent add/release request

2024-10-18 Thread Fan Ni
On Mon, Oct 14, 2024 at 12:23:22PM +0100, Jonathan Cameron wrote: > On Fri, 11 Oct 2024 13:24:50 -0700 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > One DC extent add/release request can take multiple DC extents. > > For each extent in the req

Re: [QEMU PATCH] cxl/cxl-mailbox-utils: Fix size check for cmd_firmware_update_get_info

2024-10-16 Thread Fan Ni
On Wed, Oct 16, 2024 at 05:01:38PM +0100, Jonathan Cameron wrote: > On Tue, 8 Oct 2024 20:01:07 -0700 > Davidlohr Bueso wrote: > > > On Tue, 08 Oct 2024, nifan@gmail.com wrote:\n > > >From: Fan Ni > > > > > >In the function cmd_firmware_update_get_

Re: [PATCH -qemu] hw/cxl: Support get/set mctp response payload size

2024-10-10 Thread Fan Ni
On Wed, Oct 09, 2024 at 06:41:57PM -0700, Davidlohr Bueso wrote: > Add Get/Set Response Message Limit commands. > > Signed-off-by: Davidlohr Bueso The commit log may include the cxl spec reference. Otherwise, Reviewed-by: Fan Ni > --- > hw/cxl/cxl-mailb

Re: [PATCH 2/2] hw/cxl/cxl_event: Fix interrupt triggering for dynamic capacity events grouped via More flag

2024-09-04 Thread Fan Ni
On Wed, Sep 04, 2024 at 11:37:33AM -0500, Ira Weiny wrote: > Jonathan Cameron wrote: > > On Tue, 27 Aug 2024 09:40:05 -0700 > > nifan@gmail.com wrote: > > > > > From: Fan Ni > > > > > > When inserting multiple dynamic capacity event records gr

Re: [PATCH v4 1/2] cxl/core: introduce device reporting poison hanlding

2024-08-08 Thread Fan Ni
On Thu, Aug 08, 2024 at 11:13:27PM +0800, Shiyang Ruan wrote: > CXL device can find&report memory problems, even before MCE is detected > by CPU. AFAIK, the current kernel only traces POISON error event > from FW-First/OS-First path, but it doesn't handle them, neither > notify processes who are u

Re: [PATCH] mem/cxl_type3: Fix overlapping region validation error

2024-07-18 Thread Fan Ni
On Thu, Jul 18, 2024 at 05:07:53AM -0400, Yao Xingtao wrote: > style="display:none > !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;"> > When injecting a new poisoned region through qmp_cxl_in

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-10-03 Thread Fan Ni
V_CAP_ARRAY, CAP_COUNT, cap_count); > +ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_ID, 0); > +ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1); > +ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count); > > cxl_device_cap_init(cxl_dstate, DEVICE_STATUS, 1, 2); > device_reg_init_common(cxl_dstate); > -- > 2.39.2 > Reviewed-by: Fan Ni

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-10-03 Thread Fan Ni
On Fri, Sep 29, 2023 at 09:50:16AM +0200, Markus Armbruster wrote: > Jonathan Cameron writes: > > > On Wed, 27 Sep 2023 19:13:35 +0000 > > Fan Ni wrote: > > > >> On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote: > >> > >> >

Re: [PATCH 05/19] hw/pci-bridge/cxl_upstream: Move defintion of device to header.

2023-09-28 Thread Fan Ni
is no longer an opaque structure. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/pci-bridge/cxl_upstream_port.h | 18 ++ > hw/pci-bridge/cxl_upstream.c | 11 +-- > 2 files changed, 19 insertions(+), 10 deletions(

Re: [PATCH 04/19] hw/cxl/mbox: Generalize the CCI command processing

2023-09-28 Thread Fan Ni
; Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_device.h | 5 +++- > hw/cxl/cxl-device-utils.c | 51 - > hw/cxl/cxl-mailbox-utils.c | 43 --- > 3 files changed, 64 insertions(+), 35

Re: [PATCH 03/19] hw/cxl/mbox: Pull the CCI definition out of the CXLDeviceState

2023-09-28 Thread Fan Ni
On Mon, Sep 25, 2023 at 05:11:08PM +0100, Jonathan Cameron wrote: > Enables having multiple CCIs per devices. Each CCI (mailbox) has it's own > state and command list, so they can't share a single structure. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: F

Re: [PATCH 02/19] hw/cxl/mbox: Split mailbox command payload into separate input and output

2023-09-27 Thread Fan Ni
low > for that. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_device.h | 7 +- > hw/cxl/cxl-events.c | 2 +- > hw/cxl/cxl-mailbox-utils.c | 222 +--- > 3 files changed, 132 insertions(+),

Re: [PATCH 01/19] hw/cxl/mbox: Pull the payload out of struct cxl_cmd and make instances constant

2023-09-27 Thread Fan Ni
t; > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_device.h | 13 > hw/cxl/cxl-mailbox-utils.c | 121 +++- > 2 files changed, 78 insertions(+), 56 deletions(-) > > diff --git a/include/hw/cxl/cxl_devic

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-09-27 Thread Fan Ni
On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote: > Rename the version not burried in the macro to cap_h. The change looks good to me. Just one minor thing. why "version" get involved here? Fan > > Signed-off-by: Jonathan Cameron > --- > > I had another instance of this in a se

Re: [PATCH v2 4/4] hw/cxl: Line length reductions

2023-09-18 Thread Fan Ni
On Fri, Sep 15, 2023 at 06:04:18PM +0100, Jonathan Cameron wrote: > Michael Tsirkin observed that there were some unnecessarily > long lines in the CXL code in a recent review. > This patch is intended to rectify that where it does not > hurt readability. > > Reviewed-by: Michael Tokarev > Signed

Re: [PATCH v2 3/4] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt

2023-09-18 Thread Fan Ni
On Fri, Sep 15, 2023 at 06:04:17PM +0100, Jonathan Cameron wrote: > Done to reduce line lengths where this is used. > Ext seems sufficiently obvious that it need not be spelt out > fully. > > Signed-off-by: Jonathan Cameron > Reviewed-by: Philippe Mathieu-Daudé > ---

Re: [PATCH v2 2/4] hw/cxl: Use switch statements for read and write of cachemem registers

2023-09-18 Thread Fan Ni
rce that the register storage is of the > matching size, allowing fixed values to be used for divisors of > the array indices. > > Suggested-by: Michael Tokarev > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > v2: Use switch statements. Note we coudl have renamed

Re: [PATCH v2 1/4] hw/cxl: Use a switch to explicitly check size in caps_reg_read()

2023-09-18 Thread Fan Ni
hilippe Mathieu-Daudé > --- Reviewed-by: Fan Ni > hw/cxl/cxl-device-utils.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/cxl/cxl-device-utils.c b/hw/cxl/cxl-device-utils.c > index 517f06d869..cd0c45a2ed 100644 > --- a/hw/cxl/cxl-device

Re: [PATCH 3/3] docs/cxl: Cleanout some more aarch64 examples.

2023-09-18 Thread Fan Ni
On Mon, Sep 18, 2023 at 04:02:59PM +0100, Jonathan Cameron wrote: > These crossed with the previous fix to get rid of examples > using aarch64 for which support is not yet upstream. > > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > docs/system/devices/cxl

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Fan Ni
: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/mem/cxl_type3.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c > index c5855d4e7d..ad3f0f6a9d 100644 > --- a/hw/mem/cxl_type3.c > +++ b/hw/mem/cxl_type3.c > @@ -1,3 +1,

Re: [PATCH 1/3] hw/cxl: Fix out of bound array access

2023-09-18 Thread Fan Ni
On Mon, Sep 18, 2023 at 04:02:57PM +0100, Jonathan Cameron wrote: > From: Dmitry Frolov > > According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up > to 16. This also corresponds to CXL r3.0 spec. So, the fw->target_hbs[] > array is iterated from 0 to 15. But it is staticaly

Re: [PATCH 4/4] docs/cxl: Change to lowercase as others

2023-09-12 Thread Fan Ni
jian@cn.fujitsu.com__;!!EwVzqGoTKBqv-0DWAJBm!TWHVrdL5Ys7OOFU_w1CJQ5DC6mxu649kYA9GYDJ182CNPuQqpVkWYsB5mlJpVd_BAAmhxCD4Si2CkMERZI7ZE03kPz2c$ > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > docs/system/devices/cxl.rst | 8 > 1 file changed, 4 insertions(+), 4

Re: [PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-12 Thread Fan Ni
0, the BW is 100 GB/s. So the > entry_base_unit should be changed from 1000 to 1024 given the comment notes > it's 16GB/s for .latency_bandwidth. > > Fixes: 882877fc359d ("hw/pci-bridge/cxl-upstream: Add a CDAT table access > DOE") > Signed-off-by: Dave Jian

Re: [PATCH 1/4] hw/cxl: Fix CFMW config memory leak

2023-09-12 Thread Fan Ni
wed-by: Philippe Mathieu-Daudé > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > hw/cxl/cxl-host.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c > index 034c7805b3..f0920da956 100644

Re: [PATCH v2 2/3] hw/cxl: Add QTG _DSM support for ACPI0017 device

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:46PM +0100, Jonathan Cameron wrote: > From: Dave Jiang > > Add a simple _DSM call support for the ACPI0017 device to return a fake QTG > ID value of 0 in all cases. The enabling is for _DSM plumbing testing > from the OS. > > Following edited for readbility only >

Re: [PATCH v2 1/3] tests/acpi: Allow update of DSDT.cxl

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:45PM +0100, Jonathan Cameron wrote: > Addition of QTG in following patch requires an update to the test > data. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > tests/qtest/bios-tables-test-allowed-diff.h | 1 + > 1 file

Re: [PATCH v2 3/3] tests/acpi: Update DSDT.cxl with QTG DSM

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:47PM +0100, Jonathan Cameron wrote: > Description of change in previous patch. > > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > tests/qtest/bios-tables-test-allowed-diff.h | 1 - > tests/data/acpi/q35/DSDT.cxl

Re: [PATCH v3 4/4] hw/cxl: Support 4 HDM decoders at all levels of topology

2023-09-12 Thread Fan Ni
On Mon, Sep 11, 2023 at 12:43:13PM +0100, Jonathan Cameron wrote: > Support these decoders in CXL host bridges (pxb-cxl), CXL Switch USP > and CXL Type 3 end points. > > Signed-off-by: Jonathan Cameron > > --- One comment inline, other than that, looks good to me. > v3: Factor out the hdm_in

Re: [PATCH v3 3/4] hw/cxl: Fix and use same calculation for HDM decoder block size everywhere

2023-09-12 Thread Fan Ni
so the bugs this > fixes don't actually affect anything. Previously the offset didn't > take into account that the write_msk etc are 4 byte fields. > > Signed-off-by: Jonathan Cameron > Reviewed-by: Fan Ni > -- > v3: > New patch to separate this out from the additi

Re: [PATCH v3 2/4] hw/cxl: Add utility functions decoder interleave ways and target count.

2023-09-12 Thread Fan Ni
udé > Signed-off-by: Jonathan Cameron > --- LGTM. Only one minor comment inline. Reviewed-by: Fan Ni > v3: No changes, picked up tags. > v2: Thanks to Philippe Mathieu-Daudé > - Expand both enc() and dec() functions to include full set of values >defined in CXL r3.0

Re: [PATCH v3 1/4] hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c

2023-09-12 Thread Fan Ni
é > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_component.h | 18 ++ > hw/cxl/cxl-component-utils.c | 18 ++ > 2 files changed, 20 insertions(+), 16 deletions(-) > > diff --git a/include/hw/

Re: [Qemu PATCH v2 7/9] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-09-08 Thread Fan Ni
On Fri, Sep 08, 2023 at 01:00:16PM +, J?rgen Hansen wrote: > On 7/25/23 20:39, Fan Ni wrote: > > From: Fan Ni > > > > Per CXL spec 3.0, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and > > Relea

Re: [Qemu PATCH v2 6/9] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2023-09-08 Thread Fan Ni
On Fri, Sep 08, 2023 at 01:12:45PM +, J?rgen Hansen wrote: > On 7/25/23 20:39, Fan Ni wrote: > > From: Fan Ni > > > > Add dynamic capacity extent list representative to the definition of > > CXLType3Dev and add get DC extent list mailbox command per &g

Re: [Qemu PATCH v2 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2023-08-25 Thread Fan Ni
On Fri, Aug 25, 2023 at 12:42:56PM +0100, Jonathan Cameron wrote: > On Thu, 24 Aug 2023 13:49:00 -0700 > Fan Ni wrote: > > > On Mon, Aug 07, 2023 at 09:53:42AM +0100, Jonathan Cameron wrote: > > > On Tue, 25 Jul 2023 18:39:56 + > > > Fan Ni

Re: [Qemu PATCH v2 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2023-08-24 Thread Fan Ni
On Mon, Aug 07, 2023 at 09:53:42AM +0100, Jonathan Cameron wrote: > On Tue, 25 Jul 2023 18:39:56 + > Fan Ni wrote: > > > From: Fan Ni > > > > Not all dpa range in the dc regions is valid to access until an extent > > covering the range has been added

Re: CXL volatile memory is not listed

2023-08-11 Thread Fan Ni
n use numactl --membind=numa_id app_name #numa_id is the dedicated numa node where cxl memory sits. One thing to notes, kvm will not work correctly with Qemu emulation when you try to use cxl memory for an application, so do not enable kvm. Fan > On Thu, 10 Aug 2023 at 22:03, Fan Ni wrote:

Re: CXL volatile memory is not listed

2023-08-10 Thread Fan Ni
On Wed, Aug 09, 2023 at 04:21:47AM +0530, Maverickk 78 wrote: > Hello, > > I am running qemu-system-x86_64 > > qemu-system-x86_64 --version > QEMU emulator version 8.0.92 (v8.1.0-rc2-80-g0450cf0897) > > qemu-system-x86_64 \ > -m 2G,slots=4,maxmem=4G \ > -smp 4 \ > -machine type=q35,accel=kvm,cxl=on

[Qemu PATCH v2 2/9] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2023-07-25 Thread Fan Ni
From: Fan Ni Per cxl spec 3.0, add dynamic capacity region representative based on Table 8-126 and extend the cxl type3 device definition to include dc region information. Also, based on info in 8.2.9.8.9.1, add 'Get Dynamic Capacity Configuration' mailbox support. Signed-off-

[Qemu PATCH v2 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2023-07-25 Thread Fan Ni
From: Fan Ni Not all dpa range in the dc regions is valid to access until an extent covering the range has been added. Add a bitmap for each region to record whether a dc block in the region has been backed by dc extent. For the bitmap, a bit in the bitmap represents a dc block. When a dc extent

[Qemu PATCH v2 3/9] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices

2023-07-25 Thread Fan Ni
From: Fan Ni Rename mem_size as static_mem_size for type3 memdev to cover static RAM and pmem capacity, preparing for the introduction of dynamic capacity to support dynamic capacity devices. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 5 +++-- hw/mem/cxl_type3.c | 8

[Qemu PATCH v2 5/9] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2023-07-25 Thread Fan Ni
From: Fan Ni Add (file/memory backed) host backend, all the dynamic capacity regions will share a single, large enough host backend. Set up address space for DC regions to support read/write operations to dynamic capacity for DCD. With the change, following supports are added: 1. add a new

[Qemu PATCH v2 8/9] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2023-07-25 Thread Fan Ni
From: Fan Ni Since fabric manager emulation is not supported yet, the change implements the functions to add/release dynamic capacity extents as QMP interfaces. 1. Add dynamic capacity extents: For example, the command to add two continuous extents (each is 128MB long) to region 0 (starting at

[Qemu PATCH v2 0/9] Enabling DCD emulation support in Qemu

2023-07-25 Thread Fan Ni
b2945b@iweiny-mobl.notmuch/T/#m09983a3dbaa9135a850e345d86714bf2ab957ef6 Fan Ni (9): hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

[Qemu PATCH v2 7/9] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-07-25 Thread Fan Ni
From: Fan Ni Per CXL spec 3.0, two mailbox commands are implemented: Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and Release Dynamic Capacity (Opcode 4803h) 8.2.9.8.9.4. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 253 include/hw

[Qemu PATCH v2 6/9] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2023-07-25 Thread Fan Ni
From: Fan Ni Add dynamic capacity extent list representative to the definition of CXLType3Dev and add get DC extent list mailbox command per CXL.spec.3.0:.8.2.9.8.9.2. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 71 + hw/mem/cxl_type3.c

[Qemu PATCH v2 1/9] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command

2023-07-25 Thread Fan Ni
From: Fan Ni Based on CXL spec 3.0 Table 8-94 (Identify Memory Device Output Payload), dynamic capacity event log size should be part of output of the Identify command. Add dc_event_log_size to the output payload for the host to get the info. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox

[Qemu PATCH v2 4/9] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2023-07-25 Thread Fan Ni
From: Fan Ni With the change, when setting up memory for type3 memory device, we can create DC regions A property 'num-dc-regions' is added to ct3_props to allow users to pass the number of DC regions to create. To make it easier, other region parameters like region base, length, and

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-25 Thread Fan Ni
On Tue, Jul 25, 2023 at 08:18:08AM -0700, Ira Weiny wrote: > Fan Ni wrote: > > On Thu, May 11, 2023 at 05:56:40PM +0000, Fan Ni wrote: > > > > FYI. > > > > I have updated the patch series and sent out again. > > > > I suggested anyone who are int

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-24 Thread Fan Ni
On Thu, May 11, 2023 at 05:56:40PM +, Fan Ni wrote: FYI. I have updated the patch series and sent out again. I suggested anyone who are interested in DCD and using this patch series to use the new series. Quite a few things has been fixed. https://lore.kernel.org/linux-cxl

Re: [Qemu PATCH 0/9] Enabling DCD emulation support in Qemu

2023-07-24 Thread Fan Ni
-cxl/20230724162313.34196-1-fan...@samsung.com/T/#t Thanks, Fan > On Sat, 22 Jul 2023 21:52:06 -0700 > Ira Weiny wrote: > > > nifan@ wrote: > > > From: Fan Ni > > > > > > The patch series provides dynamic capacity device (DCD) emulation in > >

[Qemu PATCH RESEND 1/9] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command

2023-07-24 Thread Fan Ni
From: Fan Ni Based on CXL spec 3.0 Table 8-94 (Identify Memory Device Output Payload), dynamic capacity event log size should be part of output of the Identify command. Add dc_event_log_size to the output payload for the host to get the info. Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox

  1   2   >