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

2025-06-13 Thread Li Zhijian via
ving the allocation after the check (as previously attempted), use g_autoptr for automatic cleanup. This ensures the array is freed even on early returns, and also removes the need for the explicit free at the end of the function. Signed-off-by: Li Zhijian --- Cc: Daniel P. Berrangé Cc: Ani Sinha Ani

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

2025-06-12 Thread Li Zhijian via
ving the GPtrArray allocation after the empty range check, ensuring memory is only allocated when actually needed. Signed-off-by: Li Zhijian --- hw/acpi/aml-build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index f8f93a9f66c8..cf19

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

2025-05-12 Thread Li Zhijian via
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 Wang Cc: Michael R. Galaxy Cc: Peter Xu Cc: Yu Zhang Reviewed-by: Jack Wang Signed-off-by: Li Zhijian --- V4

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

2025-05-11 Thread Li Zhijian via
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 Wang Cc: Michael R. Galaxy Cc: Peter Xu Cc: Yu Zhang Reviewed-by: Jack Wang Signed-off-by: Li Zhijian --- V3

[PATCH v2 1/2] qtest/migration/rdma: Enforce RLIMIT_MEMLOCK >= 128MB requirement

2025-05-08 Thread Li Zhijian via
an error state waiting migration to abort! qemu-system-x86_64: failed to save SaveStateEntry with id(name): 2(ram): -1 qemu-system-x86_64: Channel error: Operation not permitted Reported-by: Peter Xu Signed-off-by: Li Zhijian --- tests/qtest/migration/precopy-tests.c | 34

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

2025-05-08 Thread Li Zhijian via
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 Wang Cc: Michael R. Galaxy Cc: Peter Xu Cc: Yu Zhang Reviewed-by: Jack Wang Signed-off-by: Li Zhijian --- V2

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

2025-03-26 Thread Li Zhijian via
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 Wang Cc: Michael R. Galaxy Cc: Peter Xu Cc: Yu Zhang Signed-off-by: Li Zhijian --- This test is added based on [1

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

2025-03-23 Thread Li Zhijian via
Reverse the logical condition for HDM passthrough support in pci_expander_bridge. This patch ensures the HDM passthrough condition is evaluated only when hdm_for_passthrough is set to true, aligning behavior with intended semantics and comments. Signed-off-by: Li Zhijian --- This change

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

2025-03-10 Thread Li Zhijian via
er.sh clean' to revert the 'setup' # End of rdma tests Cc: Philippe Mathieu-Daudé Cc: Stefan Hajnoczi Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- Hi Fabiano, Please replace this patch in your new PR. --- V6: - make scripts/rdma-migration-helper.sh rubost, including

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

2025-03-04 Thread Li Zhijian via
Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: squash previous 2nd, 3th, 4th into one patch --- migration/ram.c | 34 +++--- migration/rdma.c | 7 ++- migration/rdma.h | 3 +-- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/migrati

[PATCH v5 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-03-04 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v5 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-03-04 Thread Li Zhijian via
lling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes: bc38dc2f5f3 ("migration: refactor ram_save_target_page functions") Reviewed-by: Peter Xu Signed-off

[PATCH v5 3/6] migration: disable RDMA + postcopy-ram

2025-03-04 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/options.c | 4

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

2025-03-04 Thread Li Zhijian via
/x86_64/migration/precopy/rdma/plain # SKIP No rdma link available # End of rdma tests Note: Remove the newly added RXE link by executing 'modprobe -r rdma_rxe' or by specifying 'clean' within this script. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V5: check comman

[PATCH v5 0/6] migration/rdma: fixes, refactor and cleanup

2025-03-04 Thread Li Zhijian via
to prevent recently added code from being deleted again. - collect Reviewed tags from Peter Changes since V1[0]: Add some saparate patches to refactor and cleanup based on V1 [0] https://lore.kernel.org/qemu-devel/20250218074345.638203-1-lizhij...@fujitsu.com/ Li Zhijian (6): migration: Prio

[PATCH v5 2/6] migration: check RDMA and capabilities are compatible on both sides

2025-03-04 Thread Li Zhijian via
transport. For scenario D2, ensure compatibility within migrate_caps_check(). Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V4: - Remove Reviewed-tag and cover above D2 scenario V3: - collect Reviewed tag - reorder: 5th -> 2nd --- migration/migr

[PATCH v4 3/6] migration: disable RDMA + postcopy-ram

2025-02-25 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/options.c | 4

[PATCH v4 2/6] migration: check RDMA and capabilities are compatible on both sides

2025-02-25 Thread Li Zhijian via
nnels and capabilities vs transport. For scenario D2, ensure compatibility within migrate_caps_check(). Signed-off-by: Li Zhijian --- V4: - Remove Reviewed-tag and cover above D2 scenario V3: - collect Reviewed tag - reorder: 5th -> 2nd --- migration/migr

[PATCH v4 0/6] migration/rdma: fixes, refactor and cleanup

2025-02-25 Thread Li Zhijian via
r and cleanup based on V1 [0] https://lore.kernel.org/qemu-devel/20250218074345.638203-1-lizhij...@fujitsu.com/ Li Zhijian (6): migration: Prioritize RDMA in ram_save_target_page() migration: check RDMA and capabilities are compatible on both sides migration: disable RDMA + postcopy-ram

[PATCH v4 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-25 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/

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

2025-02-25 Thread Li Zhijian via
test with root privilege # End of rdma tests Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- MAINTAINERS | 1 + scripts/rdma-migration-helper.sh | 41 + tests/qtest/migration/precopy-tests.c | 64 +++ 3 files changed,

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

2025-02-25 Thread Li Zhijian via
P. Signed-off-by: Li Zhijian --- V3: squash previous 2nd, 3th, 4th into one patch --- migration/ram.c | 34 +++--- migration/rdma.c | 7 ++- migration/rdma.h | 3 +-- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/migration/ram.c b/migration/r

[PATCH v4 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-02-25 Thread Li Zhijian via
lling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes: bc38dc2f5f3 ("migration: refactor ram_save_target_page functions") Reviewed-by: Peter Xu Signed-off

[PATCH v3 4/6] migration/rdma: Remove redundant migration_in_postcopy checks

2025-02-25 Thread Li Zhijian via
Since we have disabled RDMA + postcopy, it's safe to remove the migration_in_postcopy() that follows the migrate_rdma(). Signed-off-by: Li Zhijian --- V3: reorder: 7th->4th --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/

[PATCH v3 1/6] migration: Prioritize RDMA in ram_save_target_page()

2025-02-25 Thread Li Zhijian via
lling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes: bc38dc2f5f3 ("migration: refactor ram_save_target_page functions") Reviewed-by: Peter Xu Signed-off

[PATCH v3 2/6] migration: Add migration_capabilities_and_transport_compatible() helper

2025-02-25 Thread Li Zhijian via
-off-by: Li Zhijian --- V3: - collect Reviewed tag - reorder: 5th -> 2nd --- migration/migration.c | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index c597aa707e5..2eacae25e0e 100

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

2025-02-25 Thread Li Zhijian via
test with root privilege # End of rdma tests Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- MAINTAINERS | 1 + scripts/rdma-migration-helper.sh | 41 + tests/qtest/migration/precopy-tests.c | 64 +++ 3 files changed,

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

2025-02-25 Thread Li Zhijian via
P. Signed-off-by: Li Zhijian --- V3: squash previous 2nd, 3th, 4th into one patch --- migration/ram.c | 34 +++--- migration/rdma.c | 7 ++- migration/rdma.h | 3 +-- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/migration/ram.c b/migration/r

[PATCH v3 0/6] migration/rdma: fixes, refactor and cleanup

2025-02-25 Thread Li Zhijian via
ng deleted again. - collect Reviewed tags from Peter Changes since V1[0]: Add some saparate patches to refactor and cleanup based on V1 [0] https://lore.kernel.org/qemu-devel/20250218074345.638203-1-lizhij...@fujitsu.com/ Li Zhijian (6): migration: Prioritize RDMA in ram_save_target_page() migr

[PATCH v3 3/6] migration: disable RDMA + postcopy-ram

2025-02-25 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V3: - collect Reviewed tag - reoder: 6th -> 3th --- migration/migration.

[PATCH v2 0/8] migration/rdma: fixes, refactor and cleanup

2025-02-20 Thread Li Zhijian via
- It fix the RDMA migration broken issue - disable RDMA + postcopy - some cleanups - Add a qtest for RDMA at last Changs since V1[0]: Add some saparate patches to refactor and cleanup based on V1 [0] https://lore.kernel.org/qemu-devel/20250218074345.638203-1-lizhij...@fujitsu.com/ Li Zhijian

[PATCH v2 1/8] migration: Prioritize RDMA in ram_save_target_page()

2025-02-20 Thread Li Zhijian via
lling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes: bc38dc2f5f3 ("migration: refactor ram_save_target_page functions") Signed-off-by: Li Zhijian --- migr

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

2025-02-20 Thread Li Zhijian via
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 transport. Currently, only move the capabilities vs RDMA transport to this function. Signed-off-by: Li Zhijian

[PATCH v2 2/8] migration/rdma: Remove redundant RAM_SAVE_CONTROL_NOT_SUPP check

2025-02-20 Thread Li Zhijian via
qemu_rdma_save_page() no longer returns RAM_SAVE_CONTROL_NOT_SUPP since commit a4832d299dd ("migration/rdma: Check sooner if we are in postcopy for save_page()") Signed-off-by: Li Zhijian --- migration/rdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH v2 8/8] migration: Add qtest for migration over RDMA

2025-02-20 Thread Li Zhijian via
test with root privilege # End of rdma tests Signed-off-by: Li Zhijian --- MAINTAINERS | 1 + scripts/rdma-migration-helper.sh | 41 + tests/qtest/migration/precopy-tests.c | 64 +++ 3 files changed, 106 insertions(+) cre

[PATCH v2 4/8] migration: Integrate control_save_page() logic into ram_save_target_page()

2025-02-20 Thread Li Zhijian via
Refactor the page saving logic by integrating the control_save_page() function directly into ram_save_target_page(). This change consolidates the RDMA migration decision-making process into a single function, enhancing clarity and maintainability. Signed-off-by: Li Zhijian --- migration/ram.c

[PATCH v2 3/8] migration: Kill RAM_SAVE_CONTROL_NOT_SUPP

2025-02-20 Thread Li Zhijian via
() now takes responsibility for determining whether RDMA operations can proceed, based on the state of migration. Signed-off-by: Li Zhijian --- migration/ram.c | 19 ++- migration/rdma.c | 4 +--- migration/rdma.h | 3 +-- 3 files changed, 12 insertions(+), 14 deletions(-) diff

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

2025-02-20 Thread Li Zhijian via
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 +- migration/rdma.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/ra

[PATCH v2 6/8] migraion: disable RDMA + postcopy-ram

2025-02-20 Thread Li Zhijian via
It's believed that RDMA + postcopy-ram has been broken for a while. Rather than spending time re-enabling it, let's simply disable it as a trade-off. Signed-off-by: Li Zhijian --- migration/migration.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/migration.c b

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

2025-02-20 Thread Li Zhijian via
uce a scripts/rdma-migration-helper.sh to - setup a new RXE if it's root - detect existing RoCE link to make the qtest work smoothly. Test will be skip if there is no available RoCE link. # Start of rdma tests # Running /x86_64/migration/precopy/rdma/plain ok 1 /x86_64/migration/precopy/rdma

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

2025-02-17 Thread Li Zhijian via
lling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes: bc38dc2f5f3 ("migration: refactor ram_save_target_page functions") Signed-off-by: Li Zhijian --- migr

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

2025-02-17 Thread Li Zhijian via
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 Signed-off-by: Li Zhijian --- The RDMA migration was broken again...due to lack of sufficient test/qtest. It's urgly to add and execute a scri

[PATCH 1/3] hw/mem/cxl_type3: Add paired msix_uninit_exclusive_bar() call

2025-01-19 Thread Li Zhijian via
msix_uninit_exclusive_bar() should be paired with msix_init_exclusive_bar() Ensure proper resource cleanup by adding the missing `msix_uninit_exclusive_bar()` call for the Type3 CXL device. Signed-off-by: Li Zhijian --- hw/mem/cxl_type3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 3/3] hw/mem/cxl_type3: Ensure errp is set on realization failure

2025-01-19 Thread Li Zhijian via
failure scenarios as successful and potentially leading to redundant cleanup operations in ct3_exit(). Signed-off-by: Li Zhijian --- hw/mem/cxl_type3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 9eb3d0979cf5..c3b6a1d6a612

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

2025-01-19 Thread Li Zhijian via
Address a memory leak issue by ensuring `regs->special_ops` is freed when `msix_init_exclusive_bar()` encounters an error during CXL Type3 device initialization. Additionally, this patch renames err_address_space_free to err_msix_uninit for better clarity and logical flow Signed-off-by:

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

2025-01-14 Thread Li Zhijian via
b0bfad2b ("hw/cxl/mbox: Wire up interrupts for background completion") Signed-off-by: Li Zhijian --- V3: Just increate the device's msix number, A new enumeration will be introduced in later patch. # Jonathan V2: Just increase msix number and add enum to maintainer their v

[PATCH] hw/cxl: Introduce CXL_T3_MSIX_VECTOR enumeration

2025-01-14 Thread Li Zhijian via
device privately; other endpoints should refrain from using it, despite its public accessibility to all of them. Signed-off-by: Li Zhijian --- V3: new patch to introduce a T3 specific enumeration # Jonathan --- hw/cxl/cxl-device-utils.c | 12 +--- hw/cxl/switch-mailbox-cci.c | 4

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

2024-12-13 Thread Li Zhijian via
X MSIX number Fixes: 43efb0bfad2b ("hw/cxl/mbox: Wire up interrupts for background completion") Signed-off-by: Li Zhijian --- V2: just increase msix number and add enum to maintainer their values # Jonathan --- hw/cxl/cxl-device-utils.c | 6 ++ hw/mem/cxl_type3.c | 10 +++

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

2024-12-12 Thread Li Zhijian via
r function to dynamically request an available MSIX number. Fixes: 43efb0bfad2b ("hw/cxl/mbox: Wire up interrupts for background completion") Signed-off-by: Li Zhijian --- hw/cxl/cxl-device-utils.c | 3 ++- hw/mem/cxl_type3.c | 15 ++- include/hw/cxl/cxl_device.h |

[PATCH] cxl: Get rid of unused cfmw_list

2024-05-30 Thread Li Zhijian via
There is no user for this member. All '-M cxl-fmw.N' options have been parsed and saved to CXLState.fixed_windows. Signed-off-by: Li Zhijian --- hw/cxl/cxl-host.c| 1 - include/hw/cxl/cxl.h | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-ho

[PATCH v2 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all()

2024-05-15 Thread Li Zhijian via
Make the code more tight. Suggested-by: Michael Tokarev Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Collected reviewed-by tags This change/comment suggested by "Michael Tokarev " came a bit late at that time, let's update it together in these

[PATCH v2 2/3] migration/colo: make colo_incoming_co() return void

2024-05-15 Thread Li Zhijian via
Rosas Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Fix compilation failed, reported by Fabiano Rosas Collected reviewed-by tags --- include/migration/colo.h | 2 +- migration/colo-stubs.c | 3 +-- migration/colo.c | 9 ++--- migration

[PATCH v2 1/3] migration/colo: Minor fix for colo error message

2024-05-15 Thread Li Zhijian via
- Explicitly show the missing module name: replication - Fix capability name to x-colo Reviewed-by: Peter Xu Reviewed-by: Zhang Chen Signed-off-by: Li Zhijian --- V2: Collected reviewed-by tags --- migration/migration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 2/3] migration/colo: make colo_incoming_co() return void

2024-05-08 Thread Li Zhijian via
: Li Zhijian --- migration/colo.c | 9 ++--- migration/migration.c | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 5600a43d78..991806c06a 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -929,16 +929,13 @@ out

[PATCH 3/3] migration/colo: Tidy up bql_unlock() around bdrv_activate_all()

2024-05-08 Thread Li Zhijian via
Make the code more tight. Cc: Michael Tokarev Signed-off-by: Li Zhijian --- This change/comment suggested by "Michael Tokarev " came a bit late at that time, let's update it together in these minor set this time. --- migration/colo.c | 3 +-- 1 file changed, 1 insertion(

[PATCH 1/3] migration/colo: Minor fix for colo error message

2024-05-08 Thread Li Zhijian via
- Explicitly show the missing module name: replication - Fix capability name to x-colo Signed-off-by: Li Zhijian --- migration/migration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 6502e169a3..b4a09c561c 100644

[PATCH] backends/cryptodev-builtin: Fix local_error leaks

2024-04-22 Thread Li Zhijian via
It seems that this error does not need to be propagated to the upper, directly output the error to avoid the leaks Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283 Signed-off-by: Li Zhijian --- backends/cryptodev-builtin.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH v2] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-16 Thread Li Zhijian via
/-/issues/2277 Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() GRAPH_RDLOCK") Signed-off-by: Li Zhijian --- V2: fix missing bql_unlock() in error path. --- migration/colo.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a

[PATCH] migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed.

2024-04-16 Thread Li Zhijian via
/-/issues/2277 Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() GRAPH_RDLOCK") Signed-off-by: Li Zhijian --- migration/colo.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 84632a603e..

[PATCH v2] hw/mem/cxl_type3: reset dvsecs in ct3d_reset()

2024-04-09 Thread Li Zhijian via
registers could be changed by the firmware or OS, let them have their initial value in reboot so that the OS can read their clean status. Fixes: e1706ea83da0 ("hw/cxl/device: Add a memory device (8.2.8.5)") Signed-off-by: Li Zhijian --- root_port, usp and dsp have the same issue, if this p

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

2024-04-01 Thread Li Zhijian via
It helps to figure out where the first dvsec register is located. In addition, replace offset and size hardcore with existing macros. Signed-off-by: Li Zhijian --- hw/mem/cxl_type3.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw

[PATCH 2/2] CXL/cxl_type3: reset DVSEC CXL Control in ct3d_reset

2024-04-01 Thread Li Zhijian via
ult) value in reboot so that the OS can read its clean status. Signed-off-by: Li Zhijian --- hw/mem/cxl_type3.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index ad2fe7d463fb..3fe136053390 100644 --- a/hw/mem/cxl_typ

[PATCH] migration, docs: mark RDMA migration as deprecated

2024-03-31 Thread Li Zhijian via
...@fujitsu.com [2] https://lore.kernel.org/r/cahecvy7hxswn4ow_kog+q+tn6f_kmeichevz1qgm-fbxbpp...@mail.gmail.com CC: Peter Xu CC: Philippe Mathieu-Daudé CC: Fabiano Rosas CC: Thomas Huth CC: Daniel P. Berrangé CC: Yu Zhang Signed-off-by: Li Zhijian --- docs/about/deprecated.rst | 15

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

2023-10-18 Thread Li Zhijian
ned-off-by: Li Zhijian --- V2: change the source side since cache_mem_ops.{read,write}() will use cxl_cstate. --- hw/cxl/cxl-component-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index f3bbf0fd131..6214dcdc

[PATCH v2 2/2] hw/cxl: Pass NULL for a NULL MemoryRegionOps

2023-10-18 Thread Li Zhijian
a NULL parameter is enough for a NULL MemoryRegionOps Signed-off-by: Li Zhijian --- hw/cxl/cxl-component-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index 6214dcdcc12..010ed82edab 100644 --- a/hw/cxl/cxl

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

2023-10-12 Thread Li Zhijian
: Introduce CXL components (8.1.x, 8.2.5)") Signed-off-by: Li Zhijian --- hw/cxl/cxl-component-utils.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index f3bbf0fd131..f27a9d3cf60 100644 --- a/hw/cxl/

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

2023-09-26 Thread Li Zhijian
flush once each full round of memory") CC: Fabiano Rosas Signed-off-by: Li Zhijian --- V2: put that check at the entry of migrate_multifd_flush_after_each_section() # Peter --- migration/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/options.c b

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

2023-09-26 Thread Li Zhijian
known control message QEMU FILE Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Li Zhijian --- V2: add reviewed-by tags --- migration/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index a2a3db35b1..3073d9953c 100644

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

2023-09-20 Thread Li Zhijian
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 by an unexpected RDMAControlHeader.type. After this patch, error will become: qemu-s

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

2023-09-20 Thread Li Zhijian
From: Li Zhijian Destination will fail with: qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing. migrate with RDMA is different from tcp. RDMA has its own control message, and all traffic between RDMA_CONTROL_REGISTER_REQUEST and RDMA_CONTROL_REGISTER_FINISHED

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

2023-05-30 Thread Li Zhijian
Allocate targets and targets[n] resources when all sanity checks are passed to avoid memory leaks. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Li Zhijian --- V3: allocte further resource when we can't fail # Philippe V2: Delete unnecesarry check --- hw/cxl/cxl-host.c

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

2023-05-30 Thread Li Zhijian
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/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/

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

2023-05-29 Thread Li Zhijian
Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c index 034c7805b3e..d

[PATCH 1/2] docs/cxl: Correct CFMW number

2023-05-24 Thread Li Zhijian
The 'Notes:' in this document mentioned CFMW{0-2}, but the figure missed CFMW2. Signed-off-by: Li Zhijian --- I'm totally new to CXL, so i have little confidence to this change :) --- docs/system/devices/cxl.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

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

2023-05-24 Thread Li Zhijian
Using the same style except the 'Topo' abbreviation. Signed-off-by: Li Zhijian --- I'm not a native speaker, feel free to correct me. --- docs/system/devices/cxl.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/system/devices/cxl.rst b/docs

[PATCH] MAINTAINERS: email address change

2021-12-30 Thread Li Zhijian
Fujitsu's mail service has migrated to O365 months ago, the lizhij...@cn.fujitsu.com address will stop working on 2022-06-01, change it to my new email address lizhij...@fujitsu.com. Signed-off-by: Li Zhijian --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v4] migration/rdma: Fix out of order wrid

2021-10-28 Thread Li Zhijian
pendent send completion queue to distinguish ibv_post_send completion queue from the original mixed completion queue. It helps us to poll the specific CQE we are really interested in. Signed-off-by: Li Zhijian --- V4: amend log messages # Dave V3: rebase code, and combine

[PATCH v3] migration/rdma: Fix out of order wrid

2021-09-27 Thread Li Zhijian
pendent send completion queue to distinguish ibv_post_send completion queue from the original mixed completion queue. It helps us to poll the specific CQE we are really interested in. Signed-off-by: Li Zhijian --- V3: rebase code, and combine 2/2 to 1/2 V2: Introduce send completion queue --- mig

Re: [PULL 0/5] Migration.next patches

2021-09-15 Thread Li, Zhijian
on 2021/9/14 21:19, Peter Maydell wrote: On Tue, 14 Sept 2021 at 12:56, Juan Quintela wrote: The following changes since commit c6f5e042d89e79206cd1ce5525d3df219f13c3cc: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210913-3' into staging (2021-09-13 21:06:15 +01

Re: [PULL 0/7] Migration.next patches

2021-09-10 Thread Li, Zhijian
on 2021/9/10 20:55, Philippe Mathieu-Daudé wrote: BTW: Does QEMU provide any mean to set http(s)_proxy to building vm ? Currently, i have to hack the code like: -self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) +self.ssh_root_check("setenv HTTP_PROXY http://myp

[PATCH v3 1/2] migration/rdma: Try to register On-Demand Paging memory region

2021-09-10 Thread Li Zhijian
]: http://pmem.io/rpma/manpages/v0.9.0/rpma_mr_reg.3 CC: Marcel Apfelbaum Signed-off-by: Li Zhijian Reviewed-by: Marcel Apfelbaum --- V2: add ODP sanity check and remove goto --- migration/rdma.c | 73 ++ migration/trace-events | 1 + 2 files changed

[PATCH v3 0/2] enable fsdax rdma migration

2021-09-09 Thread Li Zhijian
in some modern HCA hardware/drivers. For the (2), IB provides advise API to prefetch pages in specific memory region. It can help driver reduce the page fault on responder(destination) side during RDMA_WRITE. V3: fix FreeBSD compling error Li Zhijian (2): migration/rdma: Try to register On

[PATCH v3 2/2] migration/rdma: advise prefetch write for ODP region

2021-09-09 Thread Li Zhijian
the responder does page fault as little as possible. Signed-off-by: Li Zhijian Reviewed-by: Marcel Apfelbaum --- V3: Fix FreeBSD compiling errors V2: use IBV_ADVISE_MR_FLAG_FLUSH instead of IB_UVERBS_ADVISE_MR_FLAG_FLUSH and add Reviewed-by tag. # Marcel --- meson.build| 6

Re: [PULL 0/7] Migration.next patches

2021-09-09 Thread Li, Zhijian
on 2021/9/9 21:42, Peter Maydell wrote: On Thu, 9 Sept 2021 at 11:36, Juan Quintela wrote: Fails to build, FreeBSD: ../src/migration/rdma.c:1146:23: error: use of undeclared identifier 'IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE' int advice = wr ? IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE :

[PATCH v2 1/2] migration/rdma: Try to register On-Demand Paging memory region

2021-08-22 Thread Li Zhijian
]: http://pmem.io/rpma/manpages/v0.9.0/rpma_mr_reg.3 CC: Marcel Apfelbaum Signed-off-by: Li Zhijian --- V2: add ODP sanity check and remove goto --- migration/rdma.c | 73 ++ migration/trace-events | 1 + 2 files changed, 54 insertions(+), 20 deletions

[PATCH v2 2/2] migration/rdma: advise prefetch write for ODP region

2021-08-22 Thread Li Zhijian
the responder does page fault as little as possible. Signed-off-by: Li Zhijian Reviewed-by: Marcel Apfelbaum --- V2: use IBV_ADVISE_MR_FLAG_FLUSH instead of IB_UVERBS_ADVISE_MR_FLAG_FLUSH and add Reviewed-by tag. # Marcel --- migration/rdma.c | 40

[PATCH v2 0/2] enable fsdax rdma migration

2021-08-22 Thread Li Zhijian
in some modern HCA hardware/drivers. For the (2), IB provides advise API to prefetch pages in specific memory region. It can help driver reduce the page fault on responder(destination) side during RDMA_WRITE. CC: marcel.apfelb...@gmail.com Li Zhijian (2): migration/rdma: Try to register On

Re: [PATCH] nvdimm: release the correct device list

2021-08-02 Thread Li , Zhijian/李 智坚
ping Any body could help to review/queue this patch ? On 2021/6/29 22:05, Igor Mammedov wrote: On Thu, 24 Jun 2021 19:04:15 +0800 Li Zhijian wrote: Signed-off-by: Li Zhijian Reviewed-by: Igor Mammedov --- hw/acpi/nvdimm.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v2 1/2] migration: allow multifd for socket protocol only

2021-07-31 Thread Li Zhijian
=0x563b4c44bb80) at ../util/qemu-thread-posix.c:541 #5 0x7f7fe9b5b3f9 in ?? () #6 0x in ?? () It's enough to check migrate_multifd_is_allowed() in multifd cleanup() and multifd setup() though there are so many other places using migrate_use_multifd(). Signed-off-by: Li Zh

[PATCH v2 2/2] migration: allow enabling mutilfd for specific protocol only

2021-07-31 Thread Li Zhijian
And change the default to true so that in '-incoming defer' case, user is able to change multifd capability. Signed-off-by: Li Zhijian --- migration/migration.c | 8 migration/multifd.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/mig

[PATCH 2/2] migration/rdma: advise prefetch write for ODP region

2021-07-31 Thread Li Zhijian
the responder does page fault as little as possible. Signed-off-by: Li Zhijian --- migration/rdma.c | 40 migration/trace-events | 1 + 2 files changed, 41 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index 8784b5f22a6

[PATCH 0/2] enable fsdax rdma migration

2021-07-31 Thread Li Zhijian
some modern HCA hardware/drivers. For the (2), IB provides advise API to prefetch pages in specific memory region. It can help driver reduce the page fault on responder(destination) side during RDMA_WRITE. Li Zhijian (2): migration/rdma: Try to register On-Demand Paging memory region migration

[PATCH 1/2] migration/rdma: Try to register On-Demand Paging memory region

2021-07-31 Thread Li Zhijian
]: http://pmem.io/rpma/manpages/v0.9.0/rpma_mr_reg.3 Signed-off-by: Li Zhijian --- migration/rdma.c | 27 ++- migration/trace-events | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 5c2d113aa94..8784b5f22a6

[PATCH 1/2] migration: allow multifd for socket protocol only

2021-07-16 Thread Li Zhijian
=0x563b4c44bb80) at ../util/qemu-thread-posix.c:541 #5 0x7f7fe9b5b3f9 in ?? () #6 0x in ?? () It's enough to check migrate_multifd_is_allowed() in multifd cleanup() and multifd setup() though there are so many other places using migrate_use_multifd(). Signed-off-by: Li Zh

[PATCH 2/2] migration: allow enabling mutilfd for specific protocol only

2021-07-16 Thread Li Zhijian
And change the default to true so that '-incoming defer' can enable multifd first. Signed-off-by: Li Zhijian --- migration/migration.c | 8 migration/multifd.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migrati

[PATCH] migration/rdma: prevent from double free the same mr

2021-07-08 Thread Li Zhijian
t /lib64/libc.so.6 ' Signed-off-by: Li Zhijian --- migration/rdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/rdma.c b/migration/rdma.c index b6cc4bef4a8..0f22b8227c0 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1143,6 +1143,7 @@ static int qemu_rdma_reg_who

Re: [PATCH] Fix libpmem configuration option

2021-07-08 Thread Li , Zhijian/李 智坚
i have to apply below extra changes From a8d027d3dfe70fb33363ad5934e163999fc29eec Mon Sep 17 00:00:00 2001 From: Li Zhijian Date: Thu, 8 Jul 2021 17:52:40 +0800 Subject: [PATCH] fix libpmem configuration Signed-off-by: Li Zhijian --- configure | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] misc: Remove redundant new line in perror()

2021-07-06 Thread Li Zhijian
Signed-off-by: Li Zhijian --- migration/rdma.c | 2 +- softmmu/cpus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 7fb9646f6ef..e99e2e16a73 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1133,7 +1133,7 @@ static int

[PATCH] migration/rdma: Use error_report to suppress errno message

2021-06-28 Thread Li Zhijian
evice path /sys/class/infiniband_verbs/uverbs2, infiniband class device path /sys/class/infiniband/rxe_eth0, transport: (2) Ethernet rdma_get_cm_event != EVENT_ESTABLISHED after rdma_connect: No space left on device Signed-off-by: Li Zhijian --- migration/rdma.c | 4 ++-- 1 file changed, 2 inser

[PATCH] nvdimm: release the correct device list

2021-06-24 Thread Li Zhijian
Signed-off-by: Li Zhijian --- hw/acpi/nvdimm.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index e3d5fe19392..ff317263e85 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -355,10 +355,10

  1   2   3   >