[Qemu-devel] Wiki account request

2015-04-09 Thread Fan
Hi guys, This is my first post here, so nice to meet you everyone! I’m wondering if some of you can create a Wiki account for me. I want to add installation guide (e.g. dependencies list etc) for Arch Linux on http://wiki.qemu.org/Hosts/Linux http://wiki.qemu.org/Hosts/Linux. Thanks.

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

2023-10-13 Thread fan
y: Michael Tokarev > Signed-off-by: Jonathan Cameron > Reviewed-by: Fan Ni > --- > include/hw/cxl/cxl_component.h | 3 ++- > include/hw/cxl/cxl_device.h| 5 +++-- > include/hw/cxl/cxl_events.h| 3 ++- > hw/cxl/cxl-cdat.c | 3 ++- > hw/cxl/cxl-compone

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

2023-10-24 Thread fan
On Mon, Oct 23, 2023 at 05:07:52PM +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: Fan Ni > ---

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

2023-10-24 Thread fan
ke a copy of > the input before use. > > Signed-off-by: Jonathan Cameron > Reviewed-by: Fan Ni > --- > v2: > - Drop Fan's RB as significant changes. > - Avoid passing aliased pointers to the various command handlers. > It was a source of subtle bugs in the switch-cci so

Re: [PATCH 1/5] hw/cxl: Update HDM Decoder capability to version 3

2024-01-24 Thread fan
On Wed, Jan 24, 2024 at 01:48:10PM +, Jonathan Cameron wrote: > Part of standardizing the QEMU code on CXL r3.1. > No fuctional changes as everything added is optional and > it is set as not implemented. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni

Re: [PATCH 2/5] hw/cxl: Update link register definitions.

2024-01-24 Thread fan
On Wed, Jan 24, 2024 at 01:48:11PM +, Jonathan Cameron wrote: > Not actually implemented, but we need to reserve more space for > the larger version of the structure in CXL r3.1. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_compone

Re: [PATCH 3/5] hw/cxl: Update RAS Capability Definitions for version 3.

2024-01-24 Thread fan
On Wed, Jan 24, 2024 at 01:48:12PM +, Jonathan Cameron wrote: > Part of bringing all of CXL emulation inline with CXL r3.1. > No functional changes. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > include/hw/cxl/cxl_component.h | 5 - > hw/cxl/

Re: [PATCH 01/12] cxl/cdat: Handle cdat table build errors

2024-01-24 Thread fan
; Detect the negative error code and defer cdat building. > > Fixes: f5ee7413d592 ("hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange") > Cc: Huai-Cheng Kuo > Reviewed-by: Dave Jiang > Signed-off-by: Ira Weiny > Signed-off-by: Jonathan Cameron > --- Reviewe

Re: [PATCH 4/5] hw/cxl: Update mailbox status registers.

2024-01-24 Thread fan
; > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > include/hw/cxl/cxl_device.h | 17 ++--- > hw/cxl/cxl-device-utils.c | 6 +- > 2 files changed, 15 insertions(+), 8 deletions(-) > > diff --git a/include/hw/cxl/cxl_device.h b/include/hw/cxl/cxl_dev

Re: [PATCH 02/12] hw/mem/cxl_type3: Drop handling of failure of g_malloc0()

2024-01-24 Thread fan
0 will just ". Other than that, LGTM. Reviewed-by: Fan Ni Fan > > Signed-off-by: Jonathan Cameron > --- > hw/mem/cxl_type3.c | 52 +++--- > 1 file changed, 7 insertions(+), 45 deletions(-) > > diff --git a/hw/mem/cxl

Re: [PATCH 5/5] hw/cxl: Standardize all references on CXL r3.1 and minor updates

2024-01-24 Thread fan
ize_t len_in, > @@ -732,14 +732,11 @@ static CXLRetCode cmd_logs_get_log(const struct cxl_cmd > *cmd, > get_log = (void *)payload_in; > > /* > - * 8.2.9.4.2 > - * The device shall return Invalid Parameter if the Offset or Length > + * CXL r3.1 Section 8.2.9.5.2: Get Log (Opcode 0401h)

Re: [PATCH 03/12] hw/pci-bridge/cxl_upstream: Drop g_malloc0() failure handling

2024-01-24 Thread fan
On Wed, Jan 24, 2024 at 12:40:51PM +, Jonathan Cameron wrote: > As a failure of g_malloc0() will result in QEMU exiting, it s/g_malloc0/g_malloc/ Fan > won't return a NULL to check. As such, drop the incorrect handling > of such NULL returns in the cdat table building code. &g

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

2024-02-08 Thread fan
On Wed, Jan 24, 2024 at 04:50:04PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:12 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add

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 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 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 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 v3 8/9] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-02-13 Thread fan
a rebase. > > Jonathan Thanks. Updated. FYI. The new version is completed. https://lore.kernel.org/linux-cxl/ZcuyZ0Nwq31z8YIr@debian/T/#m07b4b4586e2f421a617f08a002b196d932a88966 Thanks, Fan

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

2024-02-13 Thread fan
On Tue, Nov 07, 2023 at 10:07:04AM -0800, nifan@gmail.com wrote: > From: Fan Ni > > > The patch series are based on Jonathan's branch cxl-2023-09-26. > > The main changes include, > 1. Update cxl_find_dc_region to detect the case the range of the extent cross >

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 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 v3 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-02-16 Thread fan
ed in 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
ns which 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] 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 5/9] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-02-06 Thread fan
On Wed, Jan 24, 2024 at 03:47:21PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:09 -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 v3 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2024-02-09 Thread fan
On Wed, Jan 24, 2024 at 04:58:15PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:13 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Not all dpa range in the dc regions is valid to access until an extent > DPA ... DC etc > > >

Re: [PATCH v2 1/4] hw/cxl: fix build error in cxl_type3_stubs.c

2024-01-10 Thread fan
_dynamic_capacity functions. > > > > Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> > > Fan, this one needs squashing into your > hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents > patch in the DCD series. I'll do that in my tree, but just

Re: [PATCH v2 qemu] hw/cxl/device: read from register values in mdev_reg_read()

2024-01-11 Thread fan
reading that after this so that bug had no > obvious effect unless the driver was reloaded. > > Fixes: commit 25a52959f99d ("hw/cxl: Add support for device sanitation") > Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> > Link: https://lore.kernel.o

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

2024-01-29 Thread fan
On Wed, Jan 24, 2024 at 02:51:18PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:06 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per cxl spec 3.0, add dynamic capacity region representative based on > > Table 8-126 and exten

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

2024-02-01 Thread fan
On Wed, Jan 24, 2024 at 02:51:18PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:06 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Per cxl spec 3.0, add dynamic capacity region representative based on > > Table 8-126 and exten

Re: [PATCH 05/12] hw/cxl/mbox: Remove dead code

2024-01-24 Thread fan
dlohr Bueso > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > hw/cxl/cxl-mailbox-utils.c | 43 +- > 1 file changed, 15 insertions(+), 28 deletions(-) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.

Re: [PATCH 07/12] hw/cxl: Pass CXLComponentState to cache_mem_ops

2024-01-24 Thread fan
e, so their values are > the same. > > Fixes: 9e58f52d3f8 ("hw/cxl/component: Introduce CXL components (8.1.x, > 8.2.5)") > Signed-off-by: Li Zhijian > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > hw/cxl/cxl-component-utils.c | 2 +- > 1 file changed,

Re: [PATCH 08/12] hw/cxl: Pass NULL for a NULL MemoryRegionOps

2024-01-24 Thread fan
On Wed, Jan 24, 2024 at 12:40:56PM +, Jonathan Cameron wrote: > From: Li Zhijian > > a NULL parameter is enough for a NULL MemoryRegionOps > > Signed-off-by: Li Zhijian > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > hw/cxl/cxl-component-utils.c

Re: [PATCH 09/12] hw/mem/cxl_type3: Fix potential divide by zero reported by coverity

2024-01-24 Thread fan
-by: Jonathan Cameron > Reviewed-by: Fan Ni > --- > Note this is a stop gap until a more complex HDM decoder verification series. > --- > hw/mem/cxl_type3.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_

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 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 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-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 exten

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 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 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 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 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 > > number of DC r

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 v5 06/13] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-03-07 Thread fan
ic 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 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 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 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: [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 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: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-18 Thread fan
learing %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: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-08 Thread fan
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 need to drop the extent at the head of the event log. Now we

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 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 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 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 Dynam

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 comma

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 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 v7 00/12] Enabling DCD emulation support in Qemu

2024-04-19 Thread fan
le to 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 a few thin

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 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

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

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 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 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 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 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 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-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 functionalit

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

[Qemu-devel] [RFC qom-cpu v4 03/10] apic: remove local_apics array and using CPU_FOREACH instead

2013-10-09 Thread Chen Fan
Using CPU_FOREACH() marco instead of scaning the entire local_apics array for fast searching apic. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/intc/apic.c | 73 ++--- include/hw/i386/apic_internal.h | 2 -- 2 files changed, 32

[Qemu-devel] [RFC qom-cpu v4 06/10] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier'

2013-10-09 Thread Chen Fan
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier', for adding vcpu-remove notifier support. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 10 +- hw/i386/pc.c| 2 +- include/sysemu/sysemu.h | 2 +- qom/cpu.c

[Qemu-devel] [RFC qom-cpu v4 02/10] apic: remove redundant variable 'apic_no' from apic_init_common()

2013-10-09 Thread Chen Fan
In struct APICCommonState, there is an id field yet, which was set earlier, qdev_prop_set_uint8(env-apic_state, id, env-cpuid_apic_id); so we use the id field instead of the variable 'apic_no' to represent the unique apic index. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/intc

[Qemu-devel] [RFC qom-cpu v4 04/10] x86: add x86_cpu_unrealizefn() for cpu apic remove

2013-10-09 Thread Chen Fan
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clear the apic related information at here. and refactor apic initialization, use QOM realizefn. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/i386/kvm/apic.c | 18

[Qemu-devel] [RFC qom-cpu v4 01/10] x86: move apic_state field from CPUX86State to X86CPU

2013-10-09 Thread Chen Fan
This motion is preparing for refactoring vCPU apic subsequently. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- cpu-exec.c| 2 +- cpus.c| 5 ++--- hw/i386/kvmvapic.c| 8 +++- hw/i386/pc.c | 17 - target

[Qemu-devel] [RFC qom-cpu v4 08/10] i386: implement pc interface pc_hot_del_cpu()

2013-10-09 Thread Chen Fan
Implement cpu interface pc_hot_del_cpu() for unrealizing device vCPU. emiting vcpu-remove notifier to ACPI, then ACPI could send sci interrupt to OS for hot-remove vcpu. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/i386/pc.c | 30 -- qom/cpu.c| 12

[Qemu-devel] [RFC qom-cpu v4 00/10] i386: add cpu hot remove support

2013-10-09 Thread Chen Fan
/gmane.comp.emulators.qemu/230460 Chen Fan (10): x86: move apic_state field from CPUX86State to X86CPU apic: remove redundant variable 'apic_no' from apic_init_common() apic: remove local_apics array and using CPU_FOREACH instead x86: add x86_cpu_unrealizefn() for cpu apic remove qmp: add 'cpu-del

[Qemu-devel] [RFC qom-cpu v4 09/10] piix4: implement function cpu_status_write() for vcpu ejection

2013-10-09 Thread Chen Fan
When OS eject a vcpu (like: echo 1 /sys/bus/acpi/devices/LNXCPUXX/eject), it will call acpi EJ0 method, the firmware will write the new cpumap, QEMU will know which vcpu need to be ejected. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 37

[Qemu-devel] [RFC qom-cpu v4 05/10] qmp: add 'cpu-del' command support

2013-10-09 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/i386/pc.c | 6 ++ hw/i386/pc_piix.c| 3 ++- include/hw/boards.h | 2 ++ include/hw/i386/pc.h | 1 + qapi-schema.json | 12 qmp-commands.hx | 23 +++ qmp.c| 9

[Qemu-devel] [RFC qom-cpu v4 10/10] cpus: reclaim allocated vCPU objects

2013-10-09 Thread Chen Fan
After ACPI get a signal to eject a vCPU, then it will notify the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list, before the vCPU really removed, there will release the all related vCPU objects. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- cpus.c

[Qemu-devel] [RFC qom-cpu v4 07/10] qom cpu: add UNPLUG cpu notifier support

2013-10-09 Thread Chen Fan
Move struct HotplugEventType from file piix4.c to file qom/cpu.c, and add struct CPUNotifier for supporting UNPLUG cpu notifier. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 8 ++-- include/qom/cpu.h | 10 ++ qom/cpu.c | 6 +- 3 files

[Qemu-devel] [PATCH v1 3/3] x86: move apic_state field from CPUX86State to X86CPU

2013-10-22 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- cpu-exec.c| 2 +- cpus.c| 5 ++--- hw/i386/kvmvapic.c| 8 +++- hw/i386/pc.c | 17 - hw/intc/apic.c| 8 target-i386/cpu-qom.h | 4

[Qemu-devel] [PATCH v1 1/3] Change apic/kvm/xen to use QOM typing

2013-10-22 Thread Chen Fan
Get rid of unused icc_device_realize() Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/cpu/icc_bus.c| 17 - hw/i386/kvm/apic.c | 10 -- hw/intc/apic.c | 18 -- hw/intc/apic_common.c | 17

[Qemu-devel] [PATCH v1 2/3] Using CPU_FOREACH() instead of scanning local_apics

2013-10-22 Thread Chen Fan
And dropping MAX_APICS cast macro altogether. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/intc/apic.c | 82 + include/hw/i386/apic_internal.h | 2 - 2 files changed, 33 insertions(+), 51 deletions(-) diff --git a/hw/intc

[Qemu-devel] [PATCH v1 0/3] refactor x86 apic to QOM typing

2013-10-22 Thread Chen Fan
In order to implement 'cpu-del' in the furture. at first, needing to refactor x86 apic codes. this converts apic/kvm/xen 's init() callbacks to realize() and dropping local_apics[] from file hw/intc/apic.c. moving apic_state field from CPUX86State to X86CPU. Chen Fan (3): Change apic/kvm/xen

[Qemu-devel] [PATCH 1/1] docs/ccid.txt: fix the typo

2013-10-24 Thread Weng Fan
From: WengFan wengfan-f...@cn.fujitsu.com Date: Wed, 25 Oct 2013 11:18:22 -0400 Subject: [PATCH 1/1] fix the typo Signed-off-by: WengFan wengfan-f...@cn.fujitsu.com --- qemu-master/docs/ccid.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-master/docs/ccid.txt

[Qemu-devel] [RFC qom-cpu v2 2/8] x86: add x86_cpu_unrealizefn() for cpu apic remove

2013-09-10 Thread Chen Fan
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(), which is mostly used to clear the apic related information at here. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/cpu/icc_bus.c| 11 +++ hw/i386/kvm/apic.c | 6 ++ hw

[Qemu-devel] [RFC qom-cpu v2 1/8] apic: remove apic_no from apic_init_common()

2013-09-10 Thread Chen Fan
cpu apic_id instead of the progressive s-idx. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/intc/apic_common.c | 4 +--- target-i386/cpu.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index a0beb10..5568621

[Qemu-devel] [RFC qom-cpu v2 7/8] piix4: implement function cpu_status_write() for vcpu ejection

2013-09-10 Thread Chen Fan
When OS eject a vcpu (like: echo 1 /sys/bus/acpi/devices/LNXCPUXX/eject), it will call acpi EJ0 method, the firmware will write the new cpumap, QEMU will know which vcpu need to be ejected. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 37

[Qemu-devel] [RFC qom-cpu v2 4/8] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier'

2013-09-10 Thread Chen Fan
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier', for adding vcpu-remove notifier support. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 10 +- hw/i386/pc.c| 2 +- include/sysemu/sysemu.h | 2 +- qom/cpu.c

[Qemu-devel] [RFC qom-cpu v2 5/8] qom cpu: add UNPLUG cpu notifier support

2013-09-10 Thread Chen Fan
Move struct HotplugEventType from file piix4.c to file qom/cpu.c, and add struct CPUNotifier for supporting UNPLUG cpu notifier. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/acpi/piix4.c | 8 ++-- include/qom/cpu.h | 10 ++ qom/cpu.c | 6 +- 3 files

[Qemu-devel] [RFC qom-cpu v2 3/8] qmp: add 'cpu-del' command support

2013-09-10 Thread Chen Fan
Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/i386/pc.c | 5 + hw/i386/pc_piix.c| 1 + include/hw/boards.h | 2 ++ include/hw/i386/pc.h | 1 + qapi-schema.json | 12 qmp-commands.hx | 23 +++ qmp.c| 9

[Qemu-devel] [RFC qom-cpu v2 6/8] i386: implement pc interface pc_hot_del_cpu()

2013-09-10 Thread Chen Fan
Implement cpu interface pc_hot_del_cpu() for unrealizing device vCPU. emiting vcpu-remove notifier to ACPI, then ACPI could send sci interrupt to OS for hot-remove vcpu. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com --- hw/i386/pc.c | 29 - qom/cpu.c| 11

[Qemu-devel] [RFC qom-cpu v2 0/8] i386: add cpu hot remove support

2013-09-10 Thread Chen Fan
patches must be used with seabios patch and KVM patch together. for KVM patches: http://comments.gmane.org/gmane.comp.emulators.kvm.devel/114347 for seabios patches: http://comments.gmane.org/gmane.comp.emulators.qemu/230460 Chen Fan (8): apic: remove apic_no from apic_init_common() x86

  1   2   3   4   5   6   7   8   9   10   >