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
tual locations > of those flags matches, but doesn't cross refer so maybe in the future > we will have other flags in here and locations might not match. For the flags stored in dsmas table, do we expect there can be more than those defined in Table 7-66 in spec 3.2? Fan > > &

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

2025-04-28 Thread Fan Ni
> > Signed-off-by: Anisa Su > Similar comments to patch 8 around the double loop. > > I'd also like Fan to take a look through these (v2 probably) > as he's messed with DCD a lot more than me! It is true we can avoid the double loop here. Since the input payload is alr

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

2025-04-28 Thread Fan Ni
d only valid for DC_EVENT_REGION_CONFIG_UPDATED > > */ > > +event_rec.updated_region_id = 0; > > The event_rec is zeroed anyway so probably just don't set this at all > and no need for the comment. > > > +for (i = 0; i < in->

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
QMP to notify host2 for a in-coming MCTP message. https://lore.kernel.org/linux-cxl/20250408043051.430340-1-nifan@gmail.com/ Fan > > TL;DR: :[ distributed systems are hard to test > > > > > > > 2.If not fully supported yet, are there any available development > > &g

Re: CXL memory pooling emulation inqury

2025-03-13 Thread Fan Ni
;s say, we deploy libcxlmi test framework on the FM host, and then we can test the target host whatever features needed to test (DCD etc). Again the FM host does not need to have dcd kernel support. Compared to qmp interface, since libcxlmi already supports a lot of commands and more comm

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

2025-02-13 Thread Fan Ni
leaves cxl region labels to > do. Therefore, for some dynamically-created cxl pmem regions, users have > to re-create these regions manually. Does it means CXL drivers could not > recover > a cxl region by cxl region lables now?. As you mentioned, region label is not implemented in curr

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

2025-02-04 Thread Fan Ni
s one and remove the first one. Fan > --- > hw/cxl/cxl-mailbox-utils.c | 91 + > hw/mem/cxl_type3.c | 20 > include/hw/cxl/cxl_device.h | 24 ++ > 3 files changed, 135 insertions(+) > > diff --git a/hw/cxl/cx

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

2025-01-15 Thread Fan Ni
On Wed, Jan 15, 2025 at 01:06:24AM +, Zhijian Li (Fujitsu) wrote: > Cced QEMU, > > Hi Fan, > > I recalled we had a reboot issue[1] months ago > I guess your issue was caused by some registers not reset during reboot. > > [1] > https://lore.kernel.org/linux-cxl/20

[PATCH v2] hw/mem: support zero memory size CXL device

2024-12-03 Thread Hongjian Fan
This patch allows a CXL type3 device to be initialized with zero memory size, when there is no memory device property provided. Signed-off-by: Hongjian Fan --- hw/mem/cxl_type3.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem

Re: [PATCH] hw/mem: support zero memory size CXL device

2024-12-03 Thread Hongjian Fan
e.com/file/d/1i8kBsBfRGjNqnTQqJ9upC-Xm9o56Y2Y5/view?usp=drive_link Thanks, Hongjian Fan Seagate Internal From: Jonathan Cameron Sent: Tuesday, December 3, 2024 11:23 AM To: Hongjian Fan Cc: qemu-devel@nongnu.org ; linux-...@vger.kernel.org ; fan...@samsun

[PATCH] hw/mem: support zero memory size CXL device

2024-12-02 Thread Hongjian Fan
r volatile, persistent, nor dynamic region). Signed-off-by: Hongjian Fan --- hw/mem/cxl_type3.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 5cf754b38f..35caa186ca 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem/cxl_type3.c

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
_PCI_EXP_LNK_2_5GT; > -} > - > -if (!s->width) { > -s->width = QEMU_PCI_EXP_LNK_X1; > -} > -} > +static Property cxl_dsp_props[] = { > +DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot, > +speed, PCIE_LI

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 1/1] include/qemu/bitops.h: Add deposit8 for uint8_t bit operation

2024-08-28 Thread Jason Fan
arguments, but since the implementation seems trivial enough, I just go ahead and create the patch. Thank you. On Tue, Aug 27, 2024 at 2:23 AM Peter Maydell wrote: > On Mon, 26 Aug 2024 at 22:01, Jason Fan wrote: > > > > Signed-off-by: Jason Fan > > --- > >

[PATCH 1/1] include/qemu/bitops.h: Add deposit8 for uint8_t bit operation

2024-08-26 Thread Jason Fan
Signed-off-by: Jason Fan --- include/qemu/bitops.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 2c0a2fe751..d01c4b42f2 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -459,6 +459,32 @@ static

[PATCH 0/1] Subject: Support deposit8 in include/qemu/bitops.h

2024-08-26 Thread Jason Fan
Jason Fan (1): include/qemu/bitops.h: Add deposit8 for uint8_t bit operation include/qemu/bitops.h | 26 ++ 1 file changed, 26 insertions(+) -- 2.46.0.295.g3b9ea8a38a-goog

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

2024-08-08 Thread Fan Ni
/cxl/pci.c > @@ -1029,8 +1029,8 @@ static void cxl_handle_cper_event(enum cxl_event_type > ev_type, > hdr_flags = get_unaligned_le24(rec->event.generic.hdr.flags); > log_type = FIELD_GET(CXL_EVENT_HDR_FLAGS_REC_SEVERITY, hdr_flags); > >

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

2024-07-18 Thread Fan Ni
gt; (start + length > p->start)) { > error_setg(errp, > "Overlap with existing poisoned region not > supported"); > return; As mentioned by Peter, we can use ranges_overlap() to improve the code readability. Other than that, looks good t me. btw, not sure only me or not, but the message does not display correctly in mutt, seems not a plain text message, but looks fine in outlook. Fan > -- > 2.37.3 > >

RE: Question: xen + vhost user

2024-07-08 Thread Peng Fan
> Subject: Re: Question: xen + vhost user > > +Edgar > > I don't think we are using vhost-user so I am unable to help, but adding > Edgar just in case Thanks, just an update, it works after some code changes to Qemu. Thanks, Peng. > > On Sun, 30 Jun 202

Question: xen + vhost user

2024-06-30 Thread Peng Fan
Hi All, I am trying to enable vhost user input with xen hypervisor on i.MX95, using qemu vhost-user-input. But meet " Invalid vring_addr message ". My xen domu cfg: '-chardev', 'socket,path=/tmp/input.sock,id=mouse0', '-device', 'vhost-user-input-pci,chardev=mouse0', Anyone knows what missing?

RE: Qemu License question

2024-06-13 Thread Peng Fan
All, > Subject: Re: Qemu License question > > > IMHO this is largely a non-issue from a licensing compatibility POV, and thus > not neccessary for stable. > > This is self-contained test code that, IIUC, is not linking to the bits of > QEMU > that are GPLv-2-only, so is valid to have any license.

Qemu License question

2024-06-12 Thread Peng Fan
Hi All, The following files are marked as GPL-3.0-or-later. Will these Conflict with Qemu LICENSE? Should we update the files to GPL-2.0? ./tests/tcg/aarch64/semicall.h:7: * SPDX-License-Identifier: GPL-3.0-or-later ./tests/tcg/x86_64/system/boot.S:13: * SPDX-License-Identifier: GPL-3.0-or-later

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-21 Thread fan
On Mon, May 20, 2024 at 05:50:12PM +0100, Jonathan Cameron wrote: > On Wed, 1 May 2024 15:29:31 -0700 > fan wrote: > > > From 873f59ec06c38645768ada452d9b18920a34723e Mon Sep 17 00:00:00 2001 > > From: Fan Ni > > Date: Tue, 20 Feb 2024 09:48:31 -0800 > > Subjec

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-21 Thread fan
>From 9d6d774ec973d22c0f662b32385345a88b14cc55 Mon Sep 17 00:00:00 2001 From: Fan Ni Date: Tue, 20 Feb 2024 09:48:31 -0800 Subject: [PATCH 11/14] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents To simulate FM functionalities for initiating Dynamic Capacity

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-20 Thread fan
On Mon, May 20, 2024 at 05:50:12PM +0100, Jonathan Cameron wrote: > On Wed, 1 May 2024 15:29:31 -0700 > fan wrote: > > > From 873f59ec06c38645768ada452d9b18920a34723e Mon Sep 17 00:00:00 2001 > > From: Fan Ni > > Date: Tue, 20 Feb 2024 09:48:31 -0800 > > Subjec

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-05-17 Thread fan
On Fri, May 17, 2024 at 01:18:52PM +0100, Jonathan Cameron wrote: > On Thu, 16 May 2024 10:05:33 -0700 > fan wrote: > > > On Fri, Apr 19, 2024 at 02:24:36PM -0400, Gregory Price wrote: > > > On Thu, Apr 18, 2024 at 04:10:51PM -0700, nifan@gmail.com wrote: > >

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-05-16 Thread fan
On Tue, May 14, 2024 at 02:16:51AM +, Zhijian Li (Fujitsu) wrote: > Hi Fan > > > Do you have a newer instruction to play with the DCD. It seems that > the instruction in RFC[0] doesn't work for current code. > > [0] https://lore.kernel.org/all/20230511175609.20

Re: [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-05-16 Thread fan
> > I prefer to have the %region_len% in the error message as well so that i can > update the > backend file accordingly. Will add. Fan > > > > > +return false; > > +}

Re: [PATCH v7 04/12] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-05-16 Thread fan
On Tue, May 14, 2024 at 08:14:59AM +, Zhijian Li (Fujitsu) wrote: > > > On 19/04/2024 07:10, nifan@gmail.com wrote: > > From: Fan Ni > > > > > +} > > + > > static bool cxl_setup_memory(CXLType3Dev *ct3d, Error **errp) > > { > &g

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-05-16 Thread fan
few things but this doesn't > look like a blocker on our end, just a change to how we track bits in a > shared bit/bytemap. > Hi Gregory, I am planning to address all the concerns in this series and send out v8 next week. Jonathan mentioned you have few related patches built on top

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-01 Thread fan
Hi Markus, Michael and Jonathan, FYI. I have updated this patch based on the feedbacks so far, and posted here: https://lore.kernel.org/linux-cxl/20240418232902.583744-1-fan...@samsung.com/T/#ma25b6657597d39df23341dc43c22a8c49818e5f9 Comments are welcomed and appreciated. Fan On Wed, May 01

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-01 Thread fan
>From 873f59ec06c38645768ada452d9b18920a34723e Mon Sep 17 00:00:00 2001 From: Fan Ni Date: Tue, 20 Feb 2024 09:48:31 -0800 Subject: [PATCH] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents Status: RO Content-Length: 25172 Lines: 731 To simulate FM functionalities

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-30 Thread fan
On Mon, Apr 29, 2024 at 09:58:42AM +0200, Markus Armbruster wrote: > fan writes: > > > On Fri, Apr 26, 2024 at 11:12:50AM +0200, Markus Armbruster wrote: > >> nifan@gmail.com writes: > > [...] > > >> > diff --git a/qapi/cxl.json b/qapi/cxl.json

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-26 Thread fan
On Fri, Apr 26, 2024 at 11:12:50AM +0200, Markus Armbruster wrote: > nifan@gmail.com writes: > > > From: Fan Ni > > > > To simulate FM functionalities for initiating Dynamic Capacity Add > > (Opcode 5604h) and Dynamic Capacity Release (Opcode 5605h) as in C

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-24 Thread fan
On Wed, Apr 24, 2024 at 07:26:23PM +0200, Markus Armbruster wrote: > fan writes: > > > On Wed, Apr 24, 2024 at 03:09:52PM +0200, Markus Armbruster wrote: > >> nifan@gmail.com writes: > >> > >> > From: Fan Ni > >> > > >> &g

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-24 Thread fan
On Wed, Apr 24, 2024 at 03:09:52PM +0200, Markus Armbruster wrote: > nifan@gmail.com writes: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/release dynamic capacity extents as QM

Re: [PATCH v5 13/13] qapi/cxl.json: Add QMP interfaces to print out accepted and pending DC extents

2024-04-24 Thread fan
On Wed, Apr 24, 2024 at 03:12:34PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Mar 05, 2024 at 09:09:05AM -0800, fan wrote: > >> On Tue, Mar 05, 2024 at 04:15:30PM +, Daniel P. Berrangé wrote: > >> > On Tue, Mar 05, 2024 at 0

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-24 Thread fan
On Wed, Apr 24, 2024 at 03:09:52PM +0200, Markus Armbruster wrote: > nifan@gmail.com writes: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/release dynamic capacity extents as QM

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-04-19 Thread fan
add a Tested-by > tag early next week, along with a v1 RFC for MHD bit-tracking. > > We've been testing v5/v6 for a bit, so I expect as soon as we get the > MHD code ported over to v7 i'll ship a tested-by tag pretty quick. > > The super-set release will complicate

Re: [PATCH v6 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-16 Thread fan
On Tue, Apr 16, 2024 at 03:58:22PM +0100, Jonathan Cameron wrote: > On Mon, 15 Apr 2024 13:06:04 -0700 > fan wrote: > > > From ce75be83e915fbc4dd6e489f976665b81174002b Mon Sep 17 00:00:00 2001 > > From: Fan Ni > > Date: Tue, 20 Feb 2024 09:48:31 -0800 > > Sub

Re: [PATCH v6 10/12] hw/mem/cxl_type3: Add dpa range validation for accesses to DC regions

2024-04-16 Thread fan
On Tue, Apr 16, 2024 at 04:00:56PM +0100, Jonathan Cameron wrote: > On Mon, 15 Apr 2024 10:37:00 -0700 > fan wrote: > > > On Fri, Apr 12, 2024 at 06:54:42PM -0400, Gregory Price wrote: > > > On Mon, Mar 25, 2024 at 12:02:28PM -0700, nifan@gmail.com wrote

Re: [PATCH v6 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-04-16 Thread fan
On Tue, Apr 16, 2024 at 10:02:53AM +, Jørgen Hansen wrote: > On 4/15/24 19:56, fan wrote: > > From 4b9695299d3d4b22f83666f8ab79099ec9f9817f Mon Sep 17 00:00:00 2001 > > From: Fan Ni > > Date: Tue, 20 Feb 2024 09:48:30 -0800 > > Subject: [PATCH 08/13] hw/cxl/cxl

Re: [PATCH v6 11/12] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support

2024-04-15 Thread fan
On Fri, Apr 05, 2024 at 09:57:18AM +, Jørgen Hansen wrote: > On 3/25/24 20:02, nifan@gmail.com wrote: > > From: Fan Ni > > > > With the change, we extend the extent release mailbox command processing > > to allow more flexible release. As long as the

Re: [PATCH v6 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-15 Thread fan
>From ce75be83e915fbc4dd6e489f976665b81174002b Mon Sep 17 00:00:00 2001 From: Fan Ni Date: Tue, 20 Feb 2024 09:48:31 -0800 Subject: [PATCH 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents To simulate FM functionalities for initiating Dynamic Capacity

Re: [PATCH v6 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-04-15 Thread fan
On Thu, Apr 04, 2024 at 01:32:23PM +, Jørgen Hansen wrote: > On 3/25/24 20:02, nifan@gmail.com wrote: > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > >

Re: [PATCH v6 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-04-15 Thread fan
>From 4b9695299d3d4b22f83666f8ab79099ec9f9817f Mon Sep 17 00:00:00 2001 From: Fan Ni Date: Tue, 20 Feb 2024 09:48:30 -0800 Subject: [PATCH 08/13] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response Per CXL spec 3.1, two mailbox commands

Re: [PATCH v6 10/12] hw/mem/cxl_type3: Add dpa range validation for accesses to DC regions

2024-04-15 Thread fan
On Fri, Apr 12, 2024 at 06:54:42PM -0400, Gregory Price wrote: > On Mon, Mar 25, 2024 at 12:02:28PM -0700, nifan@gmail.com wrote: > > From: Fan Ni > > > > All dpa ranges in the DC regions are invalid to access until an extent > > covering the range has been a

Re: [PATCH v6 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-09 Thread fan
On Fri, Apr 05, 2024 at 01:18:56PM +0100, Jonathan Cameron wrote: > On Mon, 25 Mar 2024 12:02:27 -0700 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > To simulate FM functionalities for initiating Dynamic Capacity Add > > (Opcode 5604h) and Dynamic Capa

Re: [PATCH v6 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-04-09 Thread fan
On Thu, Apr 04, 2024 at 01:32:23PM +, Jørgen Hansen wrote: > On 3/25/24 20:02, nifan@gmail.com wrote: > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > >

Re: [PATCH 1/2] CXL/cxl_type3: add first_dvsec_offset() helper

2024-04-01 Thread fan
pcie_dev_ser_num_init(pci_dev, PCI_CONFIG_SPACE_SIZE, ct3d->sn); > > +cxl_cstate->dvsec_offset = first_dvsec_offset(ct3d); > ct3d->cxl_cstate.pdev = pci_dev; > build_dvsecs(ct3d); > > -- > 2.29.2 > > Hi Zhijian, Please use Qemu's checkpatch tool to make sure the patches meet the qemu code format requirement. Also, please cc linux-...@vger.kernel.org if the code is cxl related. Fan

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread fan
og '%d': Clearing %u\n", log, > - le16_to_cpu(payload->handles[i])); > + le16_to_cpu(payload->handles[i-1])); LGTM except for the space issue mentioned by Jonathan. After the fix, Reviewed-by: Fan Ni Fan > > if (i == max_handles) { > payload->nr_recs = i; > -- > 2.34.1 >

Re: [PATCH v5 06/13] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-03-14 Thread fan
On Wed, Mar 06, 2024 at 04:28:16PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Add (file/memory backed) host backend, all the dynamic capacity regions > > will share a single,

RE: [PULL 2/3] xen: Drop out of coroutine context xen_invalidate_map_cache_entry

2024-03-13 Thread Peng Fan
> Subject: Re: [PULL 2/3] xen: Drop out of coroutine context > xen_invalidate_map_cache_entry > > 13.03.2024 20:21, Michael Tokarev: > > 12.03.2024 17:27, Anthony PERARD wrote: > >> From: Peng Fan > >> > >> xen_invalidate_map_cache_entry is not expe

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-12 Thread fan
On Tue, Mar 12, 2024 at 12:37:23PM +, Jonathan Cameron wrote: > On Fri, 8 Mar 2024 20:35:53 -0800 > fan wrote: > > > On Thu, Mar 07, 2024 at 12:45:55PM +, Jonathan Cameron wrote: > > > ... > > > > > > > > > +list = record

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-08 Thread fan
om pending list, hoping the following add response for A will fail as there is not a matched extent in the pending list). 3. Host send response to the device for the add request, however, for some reason, it does not accept any of it, so updated list is empty, spec allows it. Based on the spec, we n

Re: [PATCH v5 06/13] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-03-07 Thread fan
e magic to handle very large memory regions) so > this is just a readability question, not a perf one. > > Whatever, don't leave the question behind. Find to have something > that says they are always the same size if you don't get rid > of the total_capacity representation. > I will fix it. For static capability, we have a variable static_mem_size, although we can calculate it from volatile and non-volatile memory region size. There are quite some places need to get the dynamic capacity, it is much more convenient to have a variable ready to use, I will keep it for now. Fan > > Jonathan

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-06 Thread fan
On Wed, Mar 06, 2024 at 05:48:11PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:04 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/re

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-06 Thread fan
On Wed, Mar 06, 2024 at 05:48:11PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:04 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/re

Re: [PATCH v5 08/13] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-03-06 Thread fan
On Wed, Mar 06, 2024 at 05:28:27PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:03 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 48

Re: [PATCH v5 08/13] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-03-06 Thread fan
On Wed, Mar 06, 2024 at 05:28:27PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:03 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 48

Re: [PATCH v5 06/13] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-03-06 Thread fan
On Wed, Mar 06, 2024 at 04:28:16PM +, Jonathan Cameron wrote: > On Mon, 4 Mar 2024 11:34:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Add (file/memory backed) host backend, all the dynamic capacity regions > > will share a single,

Re: [PATCH v5 13/13] qapi/cxl.json: Add QMP interfaces to print out accepted and pending DC extents

2024-03-05 Thread fan
On Tue, Mar 05, 2024 at 04:15:30PM +, Daniel P. Berrangé wrote: > On Tue, Mar 05, 2024 at 04:09:08PM +, Jonathan Cameron via wrote: > > On Mon, 4 Mar 2024 11:34:08 -0800 > > nifan@gmail.com wrote: > > > > > From: Fan Ni > > > > > &g

Re: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-03-04 Thread fan
t the content is safe. > > > > > > From: Fan Ni > > > > Per cxl spec r3.1, add dynamic capacity region representative based on > > Table 8-165 and extend the cxl type3 device definition to include dc region > > information. Also, based on info in 8.2.9.9.9.

Re: [PATCH v4 04/10] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-03-04 Thread fan
t the content is safe. > > > > > > 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 > > numb

Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes

2024-03-03 Thread fan
org/linux-mm/ph0pr08mb7955e9f08ccb64f23963b5c3a8...@ph0pr08mb7955.namprd08.prod.outlook.com/T/ Is this the right patchset you want to refer to? It is about node migration between tiers, how is it related to the context here? Fan > > This patchset automatically resolves the issues. It delays

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-29 Thread fan
On Tue, Feb 27, 2024 at 10:39:09AM +, Jonathan Cameron wrote: > On Mon, 26 Feb 2024 17:01:22 -0800 > fan wrote: > > > On Mon, Feb 26, 2024 at 06:04:17PM +, Jonathan Cameron wrote: > > > On Wed, 21 Feb 2024 10:16:01 -0800 > > > nifan@gmail.com wro

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 06:04:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:16:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 48

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 06:04:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:16:01 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per CXL spec 3.1, two mailbox commands are implemented: > > Add Dynamic Capacity Response (Opcode 48

Re: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-02-26 Thread fan
On Mon, Feb 26, 2024 at 05:33:17PM +, Jonathan Cameron wrote: > On Wed, 21 Feb 2024 10:15:55 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per cxl spec r3.1, add dynamic capacity region representative based on > > Table 8-165 and extend t

Re: [PATCH v4 00/10] Enabling DCD emulation support in Qemu

2024-02-23 Thread fan
On Wed, Feb 21, 2024 at 10:15:53AM -0800, nifan@gmail.com wrote: > From: Fan Ni > > v3[1]->v4: > > The code is rebased on mainstream QEMU with the following patch series: > > hw/cxl/mailbox: change CCI cmd set structure to be a member, not a reference > hw/cx

Re: [PATCH v4 07/10] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2024-02-23 Thread fan
On Fri, Feb 23, 2024 at 04:16:53PM +0900, Wonjae Lee wrote: > On 2024-02-22 오전 3:16, nifan@gmail.com wrote: > > From: Fan Ni > > > > Add dynamic capacity extent list representative to the definition of > > CXLType3Dev and add get DC extent list mailbox c

Re: [PATCH v4 06/10] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-02-22 Thread fan
On Thu, Feb 22, 2024 at 06:22:52PM +0900, Wonjae Lee wrote: > On Wed, Feb 21, 2024 at 10:15:59AM -0800, nifan@gmail.com wrote: > > From: Fan Ni > > > > Add (file/memory backed) host backend, all the dynamic capacity regions > > will share a single, large enough h

Re: [PATCH v4 02/10] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-02-22 Thread fan
On Thu, Feb 22, 2024 at 04:45:25PM +0900, Wonjae Lee wrote: > On Wed, Feb 21, 2024 at 10:15:55AM -0800, nifan@gmail.com wrote: > > From: Fan Ni > > > > Per cxl spec r3.1, add dynamic capacity region representative based on > > Table 8-165 and extend the cxl type3 d

Re: [PATCH] hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing

2024-02-21 Thread fan
On Wed, Feb 21, 2024 at 09:59:49PM +0100, Philippe Mathieu-Daudé wrote: > Hi, > > On 21/2/24 19:53, nifan@gmail.com wrote: > > From: Fan Ni > > > > The whole mailbox output payload space is already zeroed after copying > > out the input payload, which happe

Re: [PATCH v3 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-02-16 Thread fan
n DDR5 mode registers, change mode between codeword mode and > row count mode, and reset the ECS counter. > > Reviewed-by: Davidlohr Bueso > Signed-off-by: Shiju Jose Reviewed-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 100 - > 1 f

Re: [PATCH v3 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-16 Thread fan
ch require the background operations to be > turned off. > > Reviewed-by: Davidlohr Bueso > Signed-off-by: Shiju Jose > --- Reviewed-by: Fan Ni > hw/cxl/cxl-mailbox-utils.c | 97 +- > 1 file changed, 96 insertions(+), 1 deletion(-) > >

Re: [PATCH v3 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-02-16 Thread fan
upported device specific > features. The settings of a feature can be retrieved using Get Feature and > optionally modified using Set Feature. > > Reviewed-by: Davidlohr Bueso > Signed-off-by: Shiju Jose Reviewed-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 175 +++

Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-16 Thread fan
On Fri, Feb 16, 2024 at 10:16:12AM +, Shiju Jose wrote: > Hi Fan, > > >-Original Message----- > >From: fan > >Sent: 15 February 2024 18:47 > >To: Shiju Jose > >Cc: qemu-devel@nongnu.org; linux-...@vger.kernel.org; Jonathan Cameron > >; tanxi

Re: [PATCH v2 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-02-15 Thread fan
> > Reviewed-by: Davidlohr Bueso > Signed-off-by: Shiju Jose LGTM. Reviewed-by: Fan Ni Fan > --- > hw/cxl/cxl-mailbox-utils.c | 100 - > 1 file changed, 99 insertions(+), 1 deletion(-) > > diff --git a/hw/cxl/cxl-mailbox-ut

Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-15 Thread fan
get_feats_in->start_index > CXL_FEATURE_MAX) { > +get_feats_in->start_index >= CXL_FEATURE_MAX) { Not totally sure about this, the spec says "...Greater than..." although I also think it should be >=. Similar things for the offset usage below. Fan >

Re: [PATCH v2 0/3] hw/cxl/cxl-mailbox-utils: Add feature commands, device patrol scrub control and DDR5 ECS control features

2024-02-15 Thread fan
> 1 file changed, 360 insertions(+) > > -- > 2.34.1 > Recently, Jonathan has updated all the specification references to align with cxl spec r3.1, so for the next version, we may want to also do that. Fan

Re: [PATCH v2 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-02-15 Thread fan
upported device specific > features. The settings of a feature can be retrieved using Get Feature and > optionally modified using Set Feature. > > Reviewed-by: Davidlohr Bueso > Signed-off-by: Shiju Jose > --- Updated the references to align with cxl spec r3.1, other than that look

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

2024-02-13 Thread fan
ave gained some stricter checks > so this just broke my build after a rebase. > > Jonathan Thanks. Updated. FYI. The new version is completed. https://lore.kernel.org/linux-cxl/ZcuyZ0Nwq31z8YIr@debian/T/#m07b4b4586e2f421a617f08a002b196d932a88966 Thanks, Fan

  1   2   3   4   5   6   7   8   9   10   >