Re: [PATCH 07/52] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

Re: [PATCH 04/52] migration/rdma: Drop fragile wr_id formatting

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > wrid_desc[] uses 4001 pointers to map four integer values to strings. > > print_wrid() accesses wrid_desc[] out of bounds when passed a negative > argument. It returns null for values 2..1999 and 2001..3999. > > qemu_rdma_poll() and

Re: [PATCH 03/52] migration/rdma: Clean up rdma_delete_block()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > rdma_delete_block() always returns 0, which its only caller ignores. > Return void instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

Re: [PATCH 02/52] migration/rdma: Clean up qemu_rdma_data_init()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_data_init() return type is void *. It actually returns > RDMAContext *, and all its callers assign the value to an > RDMAContext *. Unclean. > > Return RDMAContext * instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Li

Re: [PATCH 01/52] migration/rdma: Clean up qemu_rdma_poll()'s return type

2023-09-21 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, > -1, or @ret, which is int. Its callers assign the return value to int > variables, then check whether it's negative. Unclean. > > Return int instead. > > Signed-off-by:

Re: [PATCH 00/52] migration/rdma: Error handling fixes

2023-09-21 Thread Zhijian Li (Fujitsu)
Perter, On 20/09/2023 00:49, Peter Xu wrote: > On Mon, Sep 18, 2023 at 04:41:14PM +0200, Markus Armbruster wrote: >> Oh dear, where to start. There's so much wrong, and in pretty obvious >> ways. This code should never have passed review. I'm refraining from >> saying more; see the commit

Re: [PATCH v2 2/7] migration: Clean up local variable shadowing

2023-09-21 Thread Zhijian Li (Fujitsu)
On 21/09/2023 02:31, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename variables. > >

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

2023-09-20 Thread Zhijian Li (Fujitsu)
Sorry to all, i forgot to update my email address to lizhij...@fujitsu.com. Corrected it. On 20/09/2023 17:04, Li Zhijian wrote: > From: Li Zhijian > > Destination will fail with: > qemu-system-x86_64: rdma: Too many requests in this message > (3638950032).Bailing. > > migrate with RDMA is

Re: [PATCH 2/2] migration/rdma: zore out head.repeat to make the error more clear

2023-09-20 Thread Zhijian Li (Fujitsu)
On 20/09/2023 21:01, Fabiano Rosas wrote: > Li Zhijian writes: > >> From: Li Zhijian >> >> Previously, we got a confusion error that complains >> the RDMAControlHeader.repeat: >> qemu-system-x86_64: rdma: Too many requests in this message >> (3638950032).Bailing. >> >> Actually, it's caused

Re: [PATCH v2 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-20 Thread Zhijian Li (Fujitsu)
On 15/09/2023 19:31, William Roche wrote: > On 9/15/23 05:13, Zhijian Li (Fujitsu) wrote: >> >> >> I'm okay with "RDMA isn't touched". >> BTW, could you share your reproducing program/hacking to poison the page, so >> that >> i am able

Re: [PATCH 05/52] migration/rdma: Consistently use uint64_t for work request IDs

2023-09-18 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > We use int instead of uint64_t in a few places. Change them to > uint64_t. > > This cleans up a comparison of signed qemu_rdma_block_for_wrid() > parameter @wrid_requested with unsigned @wr_id. Harmless, because the > actual arguments are

Re: [PATCH v2 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-17 Thread Zhijian Li (Fujitsu)
On 15/09/2023 19:31, William Roche wrote: > On 9/15/23 05:13, Zhijian Li (Fujitsu) wrote: >> >> >> I'm okay with "RDMA isn't touched". >> BTW, could you share your reproducing program/hacking to poison the page, so >> that >> i am able

Re: [PATCH v2 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-14 Thread Zhijian Li (Fujitsu)
On 15/09/2023 04:20, “William Roche wrote: > From: William Roche > > A memory page poisoned from the hypervisor level is no longer readable. > Thus, it is now treated as a zero-page for the ram saving migration phase. > > The migration of a VM will crash Qemu when it tries to read the >

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,

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

2023-05-31 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 >> --- >>  

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

Re: [PATCH 2/2] docs/clx: Change to lowercase as others

2023-05-25 Thread Zhijian Li (Fujitsu)
On 25/05/2023 19:49, Jonathan Cameron via wrote: > On Fri, 19 May 2023 16:58:02 +0800 > Li Zhijian wrote: > >> Using the same style except the 'Topo' abbreviation. >> >> Signed-off-by: Li Zhijian >> --- >> I'm not a native speaker, feel free to correct me. > > I've edited slightly and

<    1   2