Re: [PATCH v2 22/53] migration/rdma: Drop dead qemu_rdma_data_init() code for !@host_port

2023-10-06 Thread Zhijian Li (Fujitsu)
On 28/09/2023 21:19, Markus Armbruster wrote: > qemu_rdma_data_init() neglects to set an Error when it fails because > @host_port is null. Fortunately, no caller passes null, so this is > merely a latent bug. Drop the flawed code handling null argument. > > Signed-off-by: Markus Armbruster R

Re: [PATCH v2 1/2] migration: Fix rdma migration failed

2023-10-06 Thread Zhijian Li (Fujitsu)
On 04/10/2023 02:57, Juan Quintela wrote: > commit c638f66121ce30063fbf68c3eab4d7429cf2b209 > Author: Juan Quintela > Date: Tue Oct 3 20:53:38 2023 +0200 > > migration: Non multifd migration don't care about multifd flushes > > RDMA was having trouble because > migrate_mul

Re: [PATCH 1/1] migration: Non multifd migration don't care about multifd flushes

2023-10-11 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:55, Juan Quintela wrote: > RDMA was having trouble because > migrate_multifd_flush_after_each_section() can only be true or false, > but we don't want to send any flush when we are not in multifd > migration. > > CC: Fabiano Rosas Fixes: 294e5a4034e81b3d8db03b4e0f691386f20d6ed3

Re: [PATCH] hw/clx: Fix CFMW config memory leak

2023-05-30 Thread Zhijian Li (Fujitsu)
On 30/05/2023 23:14, Jonathan Cameron via wrote: > On Mon, 29 May 2023 15:59:56 +0800 > Li Zhijian wrote: > >> Only 'fw' pointer is marked as g_autofree, so we shoud free other >> resource manually in error path. >> > Good spot. > > Patch title typo > hw/cxl:> OMG, it was the 2nd time i have

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

2023-05-30 Thread Zhijian Li (Fujitsu)
On 31/05/2023 13:45, Philippe Mathieu-Daudé wrote: > Hi Li, > > On 31/5/23 04:34, Li Zhijian wrote: >> Only 'fw' pointer is marked as g_autofree, so we shoud free other >> resource manually in error path. >> >> Signed-off-by: Li Zhijian >> --- >> V2: Delete unnecesarry check >> --- >>   hw/cxl/

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-05 Thread Zhijian Li (Fujitsu)
On 31/08/2023 21:25, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > > Broken since day one, a

Re: [PATCH v2 1/2] hw/cxl: Pass CXLComponentState to cache_mem_ops

2023-10-23 Thread Zhijian Li (Fujitsu)
On 19/10/2023 18:50, Jonathan Cameron wrote: > On Wed, 18 Oct 2023 16:24:07 +0800 > Li Zhijian wrote: > >> cache_mem_ops.{read,write}() interprets opaque as >> CXLComponentState(cxl_cstate) instead of ComponentRegisters(cregs). >> >> Fortunately, cregs is the first member of cxl_cstate, so thei

Re: [PATCH v3 01/13] migration: Create migrate_rdma()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Helper to say if we are doing a migration over rdma. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/migration.h | 2 ++ > migration/options.h | 1 + > migration/migration.c | 1 + > migrat

Re: [PATCH v3 10/13] migration/rdma: Check sooner if we are in postcopy for save_page()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/rdma.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index d3bba05262..932d4ed

Re: [PATCH v3 04/13] migration/rdma: Remove all uses of RAM_CONTROL_HOOK

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Instead of going trhough ram_control_load_hook(), call > qemu_rdma_registration_handle() directly. > s/trhough/through Reviewed-by: Li Zhijian > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela > --- > migration/qemu-file.h | 1 - > migr

Re: [PATCH v3 07/13] qemu-file: Remove QEMUFileHooks

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > The only user was rdma, and its use is gone. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/qemu-file.h | 4 > migration/qemu-file.c | 6 -- > migration/rdma.c | 9 - >

Re: [PATCH v3 03/13] migration/rdma: Unfold ram_control_after_iterate()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Once there: > - Remove unused data parameter > - unfold it in its callers > - change all callers to call qemu_rdma_registration_stop() > - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() > > Reviewed-by: Peter Xu > Signed-off-by:

Re: [PATCH v3 08/13] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/qemu-file.h | 17 - > migration/rdma.h | 16 > migration/ram.c | 2 +- > 3 files changed, 17 insertion

Re: [PATCH v3 06/13] migration/rdma: Create rdma_control_save_page()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > The only user of ram_control_save_page() and save_page() hook was > rdma. Just move the function to rdma.c, rename it to > rdma_control_save_page(). > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela [...] > > +int rdma_control_save_page(Q

Re: [PATCH v3 09/13] migration/rdma: Remove qemu_ prefix from exported functions

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Functions are long enough even without this. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/rdma.h | 12 ++-- > migration/ram.c| 14 +++--- > migration/rdma.c

Re: [PATCH v3 05/13] migration/rdma: Unfold hook_ram_load()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > There is only one flag called with: RAM_CONTROL_BLOCK_REG. > > Reviewed-by: Peter Xu > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/qemu-file.h | 11 --- > migration/rdma.h | 3 +++ > migration/qemu-file

Re: [PATCH v3 11/13] migration/rdma: Use i as for index instead of idx

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Once there, all the uses are local to the for, so declare the variable > inside the for statement. > > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian > --- > migration/rdma.c | 49 ++-- > 1 file

Re: [PATCH v3 12/13] migration/rdma: Declare for index variables local

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Declare all variables that are only used inside a for loop inside the > for statement. > > This makes clear that they are not used outside of the for loop. > > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian

Re: [PATCH v3 02/13] migration/rdma: Unfold ram_control_before_iterate()

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Once there: > - Remove unused data parameter > - unfold it in its callers. > - change all callers to call qemu_rdma_registration_start() > - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() > > Reviewed-by: Peter Xu > Signed-off-by

Re: [PATCH v3 13/13] migration/rdma: Remove all "ret" variables that are used only once

2023-10-13 Thread Zhijian Li (Fujitsu)
On 12/10/2023 04:35, Juan Quintela wrote: > Change code that is: > > int ret; > ... > > ret = foo(); > if (ret[ < 0]?) { > > to: > > if (foo()[ < 0]) { > > Signed-off-by: Juan Quintela Reviewed-by: Li Zhijian

Re: [PATCH 39/52] migration/rdma: Convert qemu_rdma_write_one() to Error

2023-10-16 Thread Zhijian Li (Fujitsu)
On 16/10/2023 20:11, Jason Gunthorpe wrote: > On Sat, Oct 07, 2023 at 03:40:50AM +0000, Zhijian Li (Fujitsu) wrote: >> +rdma-core >> >> >> Is global variable *errno* reliable when the documentation only states >> "returns 0 on success, or the value of

Re: [PATCH] hw/cxl: Fix opaque type interpret wrongly

2023-10-18 Thread Zhijian Li (Fujitsu)
On 13/10/2023 16:52, Philippe Mathieu-Daudé wrote: > On 13/10/23 03:55, Li Zhijian wrote: >> void cxl_component_register_block_init(Object *obj, >>     CXLComponentState *cxl_cstate, >>     const char *type) >> { >> Comp

Re: [PATCH 1/3] hw/cxl: Get rid of unused cfmw_list

2024-07-04 Thread Zhijian Li (Fujitsu)
Jonathan, There is a new user for cfmw_list now https://lore.kernel.org/qemu-devel/20240704093404.1848132-1-zhao1@linux.intel.com/ So I think we should drop this patch. On 02/07/2024 22:34, Jonathan Cameron wrote: > From: Li Zhijian > > There is no user for this member. All '-M cxl-fmw.N

Re: [PATCH 1/3] hw/cxl: Get rid of unused cfmw_list

2024-07-04 Thread Zhijian Li (Fujitsu)
On 05/07/2024 10:15, Zhao Liu wrote: >> There is a new user for cfmw_list now >> https://lore.kernel.org/qemu-devel/20240704093404.1848132-1-zhao1@linux.intel.com/ >> >> So I think we should drop this patch. > Hi Zhijian, > > I'm not a "real" user and that bug was originally found by code r

Re: [PATCH] hw/cxl/cxl-host: Fix guest crash when getting cxl-fmw property

2024-07-04 Thread Zhijian Li (Fujitsu)
On 04/07/2024 17:34, Zhao Liu wrote: > From: Zhao Liu > > Guest crashes (Segmentation fault) when getting cxl-fmw property via > qmp: > IMO, it's fair to say "Guest crashes" which generally means the guest kernel panic etc. I'd prefer the subject like: hw/cxl/cxl-host: Fix segmentation fault

Re: [PATCH] MAINTAINERS: Update my email address for COLO

2024-11-14 Thread Zhijian Li (Fujitsu)
On 12/11/2024 16:40, Zhang Chen wrote: > Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 095420f8b0..3f10529d9c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS

Re: [PATCH v2] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`

2025-01-02 Thread Zhijian Li (Fujitsu)
Merry Christmas and a Happy New Year! And kindly ping... On 13/12/2024 17:36, Li Zhijian wrote: > This assertion always happens when we sanitize the CXL memory device. > $ echo 1 > /sys/bus/cxl/devices/mem0/security/sanitize > > It is incorrect to register an MSIX number beyond the device's ca

Re: [PATCH] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`

2024-12-13 Thread Zhijian Li (Fujitsu)
>From: Jonathan Cameron >Sent: Thursday, December 12, 2024 20:02 > >On Thu, 12 Dec 2024 16:55:33 +0800 >Li Zhijian via wrote: > >> This assertion always happens when we sanitize the CXL memory device. >> $ echo 1 > /sys/bus/cxl/devices/mem0/security/sanitize >> >> It is incorrect to register an M

Re: [PATCH 2/3] hw/mem/cxl_type3: Fix special_ops memory leak on msix_init_exclusive_bar() failure

2025-01-21 Thread Zhijian Li (Fujitsu)
On 21/01/2025 23:19, Jonathan Cameron wrote: >>> -msix_uninit_exclusive_bar(pci_dev); >>> g_free(regs->special_ops); >>> -err_address_space_free: >>> +err_msix_uninit: >>> +msix_uninit_exclusive_bar(pci_dev); >> This reorder doesn't look correct. >> >> Should end up I think as >> er

Re: [PATCH v2] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`

2025-01-14 Thread Zhijian Li (Fujitsu)
On 10/01/2025 23:44, Jonathan Cameron wrote: > On Fri, 13 Dec 2024 17:36:02 +0800 > Li Zhijian wrote: > >> This assertion always happens when we sanitize the CXL memory device. >> $ echo 1 > /sys/bus/cxl/devices/mem0/security/sanitize >> >> It is incorrect to register an MSIX number beyond the

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

2025-01-14 Thread Zhijian Li (Fujitsu)
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/20240409075846.85370-1-lizhij...@fujitsu.com/ On 15/01/2025 04:30, Fan Ni wrote: > Hi, > > Recently, while testing

Re: [PATCH] hw/cxl: Introduce CXL_T3_MSIX_VECTOR enumeration

2025-01-15 Thread Zhijian Li (Fujitsu)
On 15/01/2025 21:51, Jonathan Cameron wrote: > On Wed, 15 Jan 2025 15:58:46 +0800 > Li Zhijian wrote: > >> Introduce the `CXL_T3_MSIX_VECTOR` enumeration to specify MSIX vector >> assignments specific to the Type 3 (T3) CXL device. >> >> The primary goal of this change is to encapsulate the MSI

Re: CXL emulation on aarch64

2025-01-10 Thread Zhijian Li (Fujitsu)
On 10/01/2025 13:29, Itaru Kitayama wrote: > Hi, > Is anybody working on the CXL emulation on aarch64? I'm not currently working on the CXL emulation on aarch64. However, IIRC the CXL maintainer's tree should work. https://gitlab.com/jic23/qemu/ Thanks Zhijian > If there’s a WIP branch, a po

Re: [PATCH] hw/cxl: Introduce CXL_T3_MSIX_VECTOR enumeration

2025-01-16 Thread Zhijian Li (Fujitsu)
On 16/01/2025 18:50, Jonathan Cameron wrote: > On Thu, 16 Jan 2025 01:18:28 + > "Zhijian Li (Fujitsu)" wrote: > >> On 15/01/2025 21:51, Jonathan Cameron wrote: >>> On Wed, 15 Jan 2025 15:58:46 +0800 >>> Li Zhijian wrote: >>> &g

Re: [PATCH] hw/pci-bridge/pci_expander_bridge: Fix HDM passthrough condition

2025-04-06 Thread Zhijian Li (Fujitsu)
Ping Only if (dsp_count==1 && hdm_for_passthrough==true), the QEMU shouldn't implement the HDM decodder for the Host-bridge. But previous code didn't follow this. Thanks Zhijian On 23/03/2025 16:04, Li Zhijian wrote: > Reverse the logical condition for HDM passthrough support in > pci_expander

Re: [RFC PATCH] migration/rdma: Remove qemu_rdma_broken_ipv6_kernel

2025-03-26 Thread Zhijian Li (Fujitsu)
Please fix this compiling error. cc -m64 -mcx16 -Ilibcommon.a.p -Isubprojects/libvduse -I../subprojects/libvduse -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/libusb-1.0 -I/usr/include/glib-2.0 -I/usr

Re: [PATCH] hw/pci-bridge/pci_expander_bridge: Fix HDM passthrough condition

2025-04-28 Thread Zhijian Li (Fujitsu)
Hi Jonathan, I apologize for the delayed response; I have just returned from vacation. On 16/04/2025 00:47, Jonathan Cameron wrote: > On Mon, 7 Apr 2025 02:59:20 + > "Zhijian Li (Fujitsu)" wrote: > >> Ping > > Sorry, I wrote half a reply but then lost it

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-04-30 Thread Zhijian Li (Fujitsu)
On 30/04/2025 16:28, Li Zhijian wrote: > > > On 30/04/2025 05:09, Peter Xu wrote: >> On Thu, Mar 27, 2025 at 10:12:34AM +0800, Li Zhijian wrote: >>> Recently, we removed ipv6 restriction[0] from RDMA migration, add a >>> test for it. >>> >>> [0] >>> https://lore.kernel.org/qemu-devel/202503260

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-04-30 Thread Zhijian Li (Fujitsu)
On 30/04/2025 05:09, Peter Xu wrote: > On Thu, Mar 27, 2025 at 10:12:34AM +0800, Li Zhijian wrote: >> Recently, we removed ipv6 restriction[0] from RDMA migration, add a >> test for it. >> >> [0] >> https://lore.kernel.org/qemu-devel/20250326095224.9918-1-jinpu.w...@ionos.com/ >> >> Cc: Jack Wan

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-04-30 Thread Zhijian Li (Fujitsu)
On 30/04/2025 16:48, Zhijian Li (Fujitsu) via wrote: >>> stderr: >>> qemu-system-x86_64: cannot get rkey >>> qemu-system-x86_64: error while loading state section id 2(ram) >>> qemu-system-x86_64: load of migration failed: Operation not permitted >>

Re: [PATCH 2/2] [NOT-FOR-MERGE] Add qtest for migration over RDMA

2025-02-18 Thread Zhijian Li (Fujitsu)
On 19/02/2025 06:40, Peter Xu wrote: > On Tue, Feb 18, 2025 at 06:03:48PM -0300, Fabiano Rosas wrote: >> Li Zhijian via writes: >> >>> This qtest requirs there is RXE link in the host. >>> >>> Here is an example to show how to add this RXE link: >>> $ ./new-rdma-link.sh >>> 192.168.22.93 >>> >>>

Re: [PATCH 1/2] migration: Prioritize RDMA in ram_save_target_page()

2025-02-19 Thread Zhijian Li (Fujitsu)
On 19/02/2025 06:03, Peter Xu wrote: > On Tue, Feb 18, 2025 at 05:30:40PM -0300, Fabiano Rosas wrote: >> Li Zhijian via writes: >> >>> Address an error in RDMA-based migration by ensuring RDMA is prioritized >>> when saving pages in `ram_save_target_page()`. >>> >>> Previously, the RDMA protocol

Re: [PATCH v3 3/9] migration: Change migrate_fd_ to migration_

2025-02-17 Thread Zhijian Li (Fujitsu)
On 14/02/2025 01:59, Fabiano Rosas wrote: > Remove all instances of _fd_ from the migration generic code. These > functions have grown over time and the _fd_ part is now just > confusing. > > migration_fd_error() -> migration_error() makes it a little > vague. Since it's only used for migration_

Re: [PATCH v4 6/6] migration: Add qtest for migration over RDMA

2025-03-02 Thread Zhijian Li (Fujitsu)
Fabiano Thanks for your testing. On 28/02/2025 21:49, Fabiano Rosas wrote: > Li Zhijian via writes: > >> This qtest requires there is a RDMA(RoCE) link in the host. >> In order to make the test work smoothly, introduce a >> scripts/rdma-migration-helper.sh to >> - setup a new Soft-RoCE(aka RXE)

Re: [PULL 8/8] migration: Add qtest for migration over RDMA

2025-03-10 Thread Zhijian Li (Fujitsu)
On 10/03/2025 22:36, Peter Xu wrote: > On Mon, Mar 10, 2025 at 08:33:14AM +0000, Zhijian Li (Fujitsu) wrote: >> Hi Stefan, >> >> Copied to gitlab CI, >> >> On 08/03/2025 16:42, Stefan Hajnoczi wrote: >>> On Sat, Mar 8, 2025 at 2:01 PM Philip

Re: [PATCH v6] migration: Add qtest for migration over RDMA

2025-03-10 Thread Zhijian Li (Fujitsu)
Hi Fabiano, A minor improvement inline below, On 11/03/2025 10:42, Li Zhijian wrote: > This qtest requires there is a RDMA(RoCE) link in the host. > In order to make the test work smoothly, introduce a > scripts/rdma-migration-helper.sh to detect existing RoCE link before > running the test. >

Re: [PULL 8/8] migration: Add qtest for migration over RDMA

2025-03-10 Thread Zhijian Li (Fujitsu)
Hi Stefan, Copied to gitlab CI, On 08/03/2025 16:42, Stefan Hajnoczi wrote: > On Sat, Mar 8, 2025 at 2:01 PM Philippe Mathieu-Daudé > wrote: >> >> Hi, >> >> On 7/3/25 19:15, Fabiano Rosas wrote: >>> From: Li Zhijian >>> >>> This qtest requires there is a RDMA(RoCE) link in the host. >>> In ord

Re: [PULL 8/8] migration: Add qtest for migration over RDMA

2025-03-10 Thread Zhijian Li (Fujitsu)
Hi Philippe, Thanks for your testing. On 08/03/2025 14:00, Philippe Mathieu-Daudé wrote: > Hi, > > On 7/3/25 19:15, Fabiano Rosas wrote: >> From: Li Zhijian >> >> This qtest requires there is a RDMA(RoCE) link in the host. >> In order to make the test work smoothly, introduce a >> scripts/rdma

Re: [PATCH 1/2] migration: Prioritize RDMA in ram_save_target_page()

2025-02-19 Thread Zhijian Li (Fujitsu)
On 19/02/2025 21:23, Peter Xu wrote: >> I tried to kill RAM_SAVE_CONTROL_NOT_SUPP, but It seems it doesn't need to >> touch any postcopy logic >> "in the QMP migrate / migrate_incoming cmd, at >> migration_channels_and_transport_compatible()" >> >> Is there something I might have overlooked? >

Re: [PATCH 2/2] [NOT-FOR-MERGE] Add qtest for migration over RDMA

2025-02-20 Thread Zhijian Li (Fujitsu)
On 20/02/2025 23:55, Peter Xu wrote: > On Thu, Feb 20, 2025 at 05:40:38PM +0800, Li Zhijian wrote: >> On 19/02/2025 22:11, Peter Xu wrote: >>> then >>> in the test it tries to detect rdma link and fetch the ip only >> It should work without root permission if we just*detect* and*fetc

Re: [PATCH v2 7/8] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-24 Thread Zhijian Li (Fujitsu)
On 25/02/2025 04:00, Peter Xu wrote: > On Fri, Feb 21, 2025 at 02:36:11PM +0800, Li Zhijian wrote: >> Since we have disabled RDMA + postcopy, it's safe to remove >> the migration_in_postcopy() that follows the migration_rdma(). >> >> Signed-off-by: Li Zhijian >> --- >> migration/ram.c | 2 +-

Re: [PATCH v2 5/8] migration: Add migration_capabilities_and_transport_compatible() helper

2025-02-24 Thread Zhijian Li (Fujitsu)
On 25/02/2025 03:58, Peter Xu wrote: > On Fri, Feb 21, 2025 at 02:36:09PM +0800, Li Zhijian wrote: >> Similar to migration_channels_and_transport_compatible(), introduce a >> new helper migration_capabilities_and_transport_compatible() to check if >> the capabilites is compatible with the transpo

Re: [PATCH v4 5/6] migration: Unfold control_save_page()

2025-02-26 Thread Zhijian Li (Fujitsu)
On 26/02/2025 23:51, Peter Xu wrote: > On Wed, Feb 26, 2025 at 02:30:42PM +0800, Li Zhijian wrote: >> control_save_page() is for RDMA only, unfold it to make the code more >> clear. >> In addition: >> - Similar to other branches style in ram_save_target_page(), involve RDMA >> only if the c

Re: [PATCH v2 5/8] migration: Add migration_capabilities_and_transport_compatible() helper

2025-02-25 Thread Zhijian Li (Fujitsu)
On 25/02/2025 22:48, Peter Xu wrote: > On Tue, Feb 25, 2025 at 06:37:21AM +0000, Zhijian Li (Fujitsu) wrote: >> >> >> On 25/02/2025 03:58, Peter Xu wrote: >>> On Fri, Feb 21, 2025 at 02:36:09PM +0800, Li Zhijian wrote: >>>> Similar to migration_channe

Re: [PATCH v2 2/2] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-05-11 Thread Zhijian Li (Fujitsu)
On 09/05/2025 23:32, Peter Xu wrote: > Does this mean I'll need to setup twice, one for each v? > > Even if so, I did this: > > ===8<=== > $ sudo ../scripts/rdma-migration-helper.sh setup > Setup new rdma/rxe wlp0s20f3_rxe for wlp0s20f3 with 192.168.68.123 > $ sudo IP_FAMILY=ipv6 ../scripts/rdm

Re: [PATCH v3] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-05-12 Thread Zhijian Li (Fujitsu)
On 12/05/2025 21:56, Peter Xu wrote: > On Mon, May 12, 2025 at 02:01:35PM +0800, Li Zhijian wrote: >> Recently, we removed ipv6 restriction[0] from RDMA migration, add a >> test for it. >> >> [0] >> https://lore.kernel.org/qemu-devel/20250326095224.9918-1-jinpu.w...@ionos.com/ >> >> Cc: Jack Wan

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-05-07 Thread Zhijian Li (Fujitsu)
On 01/05/2025 05:52, Peter Xu wrote: >> +#include >> +#define REQUIRED_MEMLOCK (128 * 1024 * 1024) // 128MB > How does the 128M come from? Is it correlated to the VM size somehow? > Btw, migrate_start() says for x86 we use 150MB VM. Good question, After a brief debugging session, it was discov

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-21 Thread Zhijian Li (Fujitsu)
On 15/05/2025 04:01, Peter Xu wrote: > A new parameter "-a" is added to "info migrate" to dump all info, while > when not specified it only dumps the important ones. When at it, reorg > everything to make it easier to read for human. > > The general rule is: > >- Put important things at th

Re: [PATCH 01/11] migration/hmp: Reorg "info migrate" once more

2025-05-27 Thread Zhijian Li (Fujitsu)
copy=1.39 GiB > Page Types: normal=367713, zero=41195 >Page Rates (pps): transfer=40900, dirty=4 >Others: dirty_syncs=2, postcopy_req=57503 > > Cc: Zhijian Li (Fujitsu) > Suggested-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu Thanks for

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

2025-05-15 Thread Zhijian Li (Fujitsu)
On 13/05/2025 19:14, Jonathan Cameron via wrote: > Previously these somewhat device like structures were tracked using a list > in the CXLState in each machine. This is proving restrictive in a few > cases where we need to iterate through these without being aware of the > machine type. Just mak

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

2025-05-15 Thread Zhijian Li (Fujitsu)
On 13/05/2025 19:14, Jonathan Cameron via wrote: > To enable these to be found in a fixed order, that order needs > to be known. This will later be used to sort a list of these > structures that address map and ACPI table entries are predictable. > > Signed-off-by: Jonathan Cameron Reviewed-

Re: [PATCH v13 3/5] hw/cxl-host: Allow split of establishing memory address and mmio setup.

2025-05-15 Thread Zhijian Li (Fujitsu)
On 13/05/2025 19:14, Jonathan Cameron via wrote: > > +hwaddr cxl_fmws_set_memmap(hwaddr base, hwaddr max_addr) > +{ > +GSList *cfmws_list, *iter; > + > +struct cfmw_update_state cfmwss = { > +.base = base, > +.maxaddr = max_addr, > +.update_mmio = false, > +

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-21 Thread Zhijian Li (Fujitsu)
On 22/05/2025 05:04, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: >> On Wed, May 21, 2025 at 08:43:37AM +, Zhijian Li (Fujitsu) wrote: >> [...] >>>> After this change, sample output (default, no "-a" specified): >>>> &

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-21 Thread Zhijian Li (Fujitsu)
On 21/05/2025 22:03, Peter Xu wrote: > On Wed, May 21, 2025 at 08:43:37AM +0000, Zhijian Li (Fujitsu) wrote: > [...] >>> After this change, sample output (default, no "-a" specified): >>> >>> Status: postcopy-active >>> Time (m

Re: [PATCH v2 2/2] migration/hmp: Add "info migrate -a", reorg the dump

2025-05-22 Thread Zhijian Li (Fujitsu)
On 22/05/2025 21:16, Peter Xu wrote: > I followed up with Dave's idea, but then added all entries into it, below. > >Status: postcopy-active >Time (ms): total=40504, setup=14, down=145 >RAM info: > Throughput (Mbps): 6102.65 > Sizes (KiB):pagesize=4, total=16777992

Re: [PATCH] hw/acpi: Fix GPtrArray memory leak in crs_range_merge

2025-06-13 Thread Zhijian Li (Fujitsu)
On 13/06/2025 16:07, Daniel P. Berrangé wrote: > On Fri, Jun 13, 2025 at 12:40:02PM +0800, Li Zhijian via wrote: >> This leak was detected by the valgrind. >> >> The crs_range_merge() function unconditionally allocated a GPtrArray >> 'even when range->len was zero, causing an early return without

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

2025-06-12 Thread Zhijian Li (Fujitsu)
On 12/06/2025 21:43, Jonathan Cameron wrote: > Previously these somewhat device like structures were tracked using a list > in the CXLState in each machine. This is proving restrictive in a few > cases where we need to iterate through these without being aware of the > machine type. Just make the

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

2025-05-29 Thread Zhijian Li (Fujitsu)
On 29/05/2025 21:48, Jonathan Cameron via wrote: > This has been wrong from day 1. For now we only have > two entries (component and device registers). Wow, I finally understood this. > > The wrong size could lead to arbitrary data off the stack being presented > in PCIe config space. > > S

Re: [PATCH v14 3/5] hw/cxl-host: Allow split of establishing memory address and mmio setup.

2025-06-08 Thread Zhijian Li (Fujitsu)
In patch 2/5, we introduced `cxl_fmws_set_memmap_and_update_mmio()`. Initially, I assumed patch 3/5 would split `cxl_fmws_set_memmap_and_update_mmio()` into two steps: 1. Traverse CXLFixedWindow and update `fw->base`. 2. Call `sysbus_mmio_map(SYS_BUS_DEVICE(fw), 0, fw->base)`. For example (my pe

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

2025-06-08 Thread Zhijian Li (Fujitsu)
On 28/05/2025 19:07, Jonathan Cameron via wrote: > Previously these somewhat device like structures were tracked using a list > in the CXLState in each machine. This is proving restrictive in a few > cases where we need to iterate through these without being aware of the > machine type. Just mak

Re: [PATCH v14 0/5] arm/virt: CXL support via pxb_cxl

2025-06-08 Thread Zhijian Li (Fujitsu)
On 28/05/2025 19:07, Jonathan Cameron via wrote: > Jonathan Cameron (5): >hw/cxl-host: Add an index field to CXLFixedMemoryWindow >hw/cxl: Make the CXL fixed memory windows devices. >hw/cxl-host: Allow split of establishing memory address and mmio > setup. With above 3 patches +

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

2025-06-12 Thread Zhijian Li (Fujitsu)
On 12/06/2025 21:43, Jonathan Cameron wrote: > To enable these to be found in a fixed order, that order needs to be known. > This will later be used to sort a list of these structures so that address > map and ACPI table entries are predictable. > > Reviewed-by: Li Zhijian > Reviewed-by: Fan Ni

<    1   2