Re: [PATCH for 8.1 v2 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-04-02 Thread Jason Wang
On Fri, Mar 31, 2023 at 6:12 PM Eugenio Perez Martin wrote: > > On Fri, Mar 31, 2023 at 10:00 AM Jason Wang wrote: > > > > > > 在 2023/3/30 18:42, Eugenio Perez Martin 写道: > > > On Thu, Mar 30, 2023 at 8:23 AM Jason Wang wrote: > > >> On Thu, Mar 30, 2023 at 2:20 PM Jason Wang wrote: > > >>> On

Re: [PATCH] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-02 Thread Yohei Kojima
I add more detailed explanation for the documentation update here. On 2023/03/30 19:09, Yohei Kojima wrote: > This commit adds the following description: > 1. `memdev` option is recommended over `mem` option (see [1,2]) > 2. users must specify memory for all NUMA nodes (see [2]) > > This commit

Re: [PATCH 00/16] i3c: aspeed: Add I3C support

2023-04-02 Thread Cédric Le Goater
Hello, On 4/1/23 19:28, Ben Dooks wrote: On Fri, Mar 31, 2023 at 01:01:15AM +, Joe Komlodi wrote: Hi all, This series adds I3C bus support to QEMU and adds more functionality to the Aspeed I3C controller. This implementation is a basic implementation that introduces IBIs (including

Re: [PATCH 00/16] i3c: aspeed: Add I3C support

2023-04-02 Thread Jeremy Kerr
Hi Cédric, > > Isn't this the designware i3c ip block, and as such could we name > > it so? > > Currently, QEMU only has a model for a dummy Aspeed I3C variant so > this is a great addition. [...] > According to recent work on the kernel, it is indeed based on > designware I3C : >    >

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread liweiwei
On 2023/4/2 08:34, LIU Zhiwei wrote: On 2023/4/1 20:49, Weiwei Li wrote: Add a base save_pc For pc_save for PC-relative translation(CF_PCREL). Diable the directly sync pc from tb by riscv_cpu_synchronize_from_tb. Sync pc before it's used or updated from tb related pc:     real_pc =

[PATCH 1/2] qtest/migration-test.c: Add test with compress enabled

2023-04-02 Thread Lukas Straub
There has never been a test for migration with compress enabled. Add a suitable test, testing with compress-wait-thread = false too. iterations = 2 is intentional, so it also tests that no invalid thread state is left over from the previous iteration. Signed-off-by: Lukas Straub ---

[PATCH 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-02 Thread Lukas Straub
Since ec6f3ab9, migration with compress enabled was broken, because the compress threads use a dummy QEMUFile which just acts as a buffer and that commit accidentally changed it to use the outgoing migration channel instead. Fix this by using the dummy file again in the compress threads.

[PATCH RESEND 2/2] migration/ram.c: Fix migration with compress enabled

2023-04-02 Thread Lukas Straub
Since ec6f3ab9, migration with compress enabled was broken, because the compress threads use a dummy QEMUFile which just acts as a buffer and that commit accidentally changed it to use the outgoing migration channel instead. Fix this by using the dummy file again in the compress threads.

[PATCH RESEND 1/2] qtest/migration-test.c: Add test with compress enabled

2023-04-02 Thread Lukas Straub
There has never been a test for migration with compress enabled. Add a suitable test, testing with compress-wait-thread = false too. iterations = 2 is intentional, so it also tests that no invalid thread state is left over from the previous iteration. Signed-off-by: Lukas Straub ---

[PATCH 14/14] migration: Initialize and cleanup decompression in migration.c

2023-04-02 Thread Lukas Straub
This fixes compress with colo. Signed-off-by: Lukas Straub --- migration/migration.c | 9 + migration/ram.c | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ae2025d9d8..cbdc10b840 100644 ---

[PATCH 05/14] ram.c: Call update_compress_thread_counts from compress_send_queued_data

2023-04-02 Thread Lukas Straub
This makes the core compress code more independend from ram.c. Signed-off-by: Lukas Straub --- migration/ram.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 7ab008145b..f55eb0e587 100644 --- a/migration/ram.c +++

[PATCH 01/14] ram.c: Let the compress threads return a CompressResult enum

2023-04-02 Thread Lukas Straub
This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[PATCH 13/14] ram-compress.c: Make target independent

2023-04-02 Thread Lukas Straub
Make ram-compress.c target independent. Signed-off-by: Lukas Straub --- migration/meson.build| 2 +- migration/ram-compress.c | 16 +--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/migration/meson.build b/migration/meson.build index 262e3c9754..16f642031c

[PATCH 12/14] ram.c: Remove unused include after moving out code

2023-04-02 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 7a8f540737..9072d70f7c 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -32,7 +32,6 @@ #include "qemu/bitmap.h" #include "qemu/madvise.h" #include

[PATCH 02/14] ram.c: Dont change param->block in the compress thread

2023-04-02 Thread Lukas Straub
Instead introduce a extra parameter to trigger the compress thread. Now, when the compress thread is done, we know what RAMBlock and offset it did compress. This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub --- migration/ram.c |

[PATCH 08/14] ram.c: Move core compression code into its own file

2023-04-02 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub --- migration/meson.build| 5 +- migration/ram-compress.c | 273 +++ migration/ram-compress.h | 65 ++ migration/ram.c | 255 +--- 4 files

[PATCH 03/14] ram.c: Reset result after sending queued data

2023-04-02 Thread Lukas Straub
And take the param->mutex lock for the whole section to ensure thread-safety. Now, it is explicitly clear if there is no queued data to send. Before, this was handled by param->file stream being empty and thus qemu_put_qemu_file() not sending anything. This will be used in the next commits to

[PATCH 07/14] ram.c: Introduce whitespace (squash with next patch)

2023-04-02 Thread Lukas Straub
Introduce whitespace to make it easier to reroll the series. Signed-off-by: Lukas Straub --- migration/ram.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 20428ccf42..475c04a18b 100644 --- a/migration/ram.c +++ b/migration/ram.c @@

[PATCH 10/14] ram.c: Move core decompression code into its own file

2023-04-02 Thread Lukas Straub
No functional changes intended. Signed-off-by: Lukas Straub --- migration/ram-compress.c | 203 ++ migration/ram-compress.h | 5 + migration/ram.c | 204 --- 3 files changed, 208 insertions(+), 204 deletions(-)

[PATCH 09/14] ram.c: Remove whitespace (squash with previous patch)

2023-04-02 Thread Lukas Straub
Signed-off-by: Lukas Straub --- migration/ram.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 114901241e..31b9b0b9ec 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -530,24 +530,6 @@ static bool pss_overlap(PageSearchStatus

[PATCH 04/14] ram.c: Do not call save_page_header() from compress threads

2023-04-02 Thread Lukas Straub
save_page_header() accesses several global variables, so calling it from multiple threads is pretty ugly. Instead, call save_page_header() before writing out the compressed data from the compress buffer to the migration stream. This also makes the core compress code more independend from ram.c.

[PATCH 11/14] ram compress: Assert that the file buffer matches the result

2023-04-02 Thread Lukas Straub
Before this series, "nothing to send" was handled by the file buffer being empty. Now it is tracked via param->result. Assert that the file buffer state matches the result. Signed-off-by: Lukas Straub --- migration/qemu-file.c| 11 +++ migration/qemu-file.h| 1 +

[PATCH 00/14] migration/ram.c: Refactor compress code

2023-04-02 Thread Lukas Straub
This series refactors the ram compress code. It first removes ram.c dependencies from the core compress code, then moves it out to its own file. Finally, on the migration destination side the initialisation and cleanup of compress threads is moved out of ram.c to migration.c. This allows using

[PATCH 06/14] ram.c: Remove last ram.c dependency from the core compress code

2023-04-02 Thread Lukas Straub
Make compression interfaces take send_queued_data() as an argument. Remove save_page_use_compression() from flush_compressed_data(). This removes the last ram.c dependency from the core compress code. Signed-off-by: Lukas Straub --- migration/ram.c | 27 +-- 1 file

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread Richard Henderson
On 4/2/23 06:17, LIU Zhiwei wrote: Why set pc_save here?  IMHO, pc_save is a constant. pc_save is a value which is strictly related to the value of env->pc. real_pc = (old)env->pc + target_pc(from tb) - ctx->pc_save In this formula, the meaning of target_pc(from tb) doesn't match with

Re: [PATCH v3 0/4] util: Add thread-safe qemu_strerror() function

2023-04-02 Thread Yohei Kojima
I explain why I did not add "Fixes:" line while it is advised to add in the previous review. It is because this patch series solves the issue partially, not completely. There are many more files that includes `strerror()` call, but changing all of them will result in the huge patch series that is

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread LIU Zhiwei
On 2023/4/2 16:17, liweiwei wrote: On 2023/4/2 08:34, LIU Zhiwei wrote: On 2023/4/1 20:49, Weiwei Li wrote: Add a base save_pc For pc_save for PC-relative translation(CF_PCREL). Diable the directly sync pc from tb by riscv_cpu_synchronize_from_tb. Sync pc before it's used or updated from

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread liweiwei
On 2023/4/2 21:17, LIU Zhiwei wrote: On 2023/4/2 16:17, liweiwei wrote: On 2023/4/2 08:34, LIU Zhiwei wrote: On 2023/4/1 20:49, Weiwei Li wrote: Add a base save_pc For pc_save for PC-relative translation(CF_PCREL). Diable the directly sync pc from tb by riscv_cpu_synchronize_from_tb.

Re: [PATCH 0/7] bsd-user: remove bitrotted NetBSD and OpenBSD bsd-user support

2023-04-02 Thread Warner Losh
After consulting with Taylor Campbell, I'm going to hold off on this for now. He had some code to start to fix things, which I hope he can find time and energy to port over to the (more complete) qemu-bsd-user upstream so that there's one target for people working on the area that will eventually

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread liweiwei
On 2023/4/3 02:00, Richard Henderson wrote: On 4/2/23 06:17, LIU Zhiwei wrote: Why set pc_save here?  IMHO, pc_save is a constant. pc_save is a value which is strictly related to the value of env->pc. real_pc = (old)env->pc + target_pc(from tb) - ctx->pc_save In this formula, the meaning

RE: [PATCH 00/14] migration/ram.c: Refactor compress code

2023-04-02 Thread Zhang, Chen
> -Original Message- > From: qemu-devel-bounces+chen.zhang=intel@nongnu.org devel-bounces+chen.zhang=intel@nongnu.org> On Behalf Of Lukas > Straub > Sent: Monday, April 3, 2023 1:56 AM > To: qemu-devel > Cc: Dr. David Alan Gilbert ; Juan Quintela > ; Peter Xu > Subject:

Re: [RFC PATCH v2 33/44] target/loongarch: Implement vfrstp

2023-04-02 Thread gaosong
在 2023/4/2 下午1:17, Richard Henderson 写道: On 3/27/23 20:06, Song Gao wrote: This patch includes: - VFRSTP[I].{B/H}. Signed-off-by: Song Gao ---   target/loongarch/disas.c    |  5 +++   target/loongarch/helper.h   |  5 +++  

Re: [RESEND PATCH v5 4/6] target/riscv: Add support for PC-relative translation

2023-04-02 Thread liweiwei
On 2023/4/2 21:53, liweiwei wrote: On 2023/4/2 21:17, LIU Zhiwei wrote: On 2023/4/2 16:17, liweiwei wrote: On 2023/4/2 08:34, LIU Zhiwei wrote: On 2023/4/1 20:49, Weiwei Li wrote: Add a base save_pc For pc_save for PC-relative translation(CF_PCREL). Diable the directly sync pc from

Re: [PATCH 10/16] hw/i3c/aspeed_i3c: Add IBI handling

2023-04-02 Thread Jeremy Kerr
Hi Joe, First up, nice work with this series! I haven't yet had a thorough look at the series, but one item on something that caught me up on the Linux side: > +static void aspeed_i3c_device_ibi_queue_push(AspeedI3CDevice *s) > +{ > +    /* Stored value is in 32-bit chunks, convert it to byte