Re: [PATCH v8] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-02 Thread Volker Rümelin
Am 28.03.23 um 13:56 schrieb Dorinda Bassey: Hi Dorinda, Hi Volker, Thanks for the feedback. This term is constant for the lifetime of the playback stream. It could be precalculated in qpw_init_out(). It's still constant even when precalculated in qpw_init_out(). It's an optimi

Re: [PATCH] Make bootable RPi4B model

2023-04-02 Thread Philippe Mathieu-Daudé
Hi Sergey, On 2/4/23 18:53, Sergey Kambalin wrote: Signed-off-by: Sergey Kambalin --- configs/devices/aarch64-softmmu/default.mak | 1 + hw/arm/Kconfig | 7 + hw/arm/bcm2835_peripherals.c| 218 ++ hw/arm/bcm2836.c

Re: [PATCH trivial for-8.0] hw/virtio/virtio-qmp.c: spelling: suppoted

2023-04-02 Thread Philippe Mathieu-Daudé
On 1/4/23 10:51, Michael Tokarev wrote: Fixes: f3034ad71fcd0a6a58bc37830f182b307f089159 Signed-off-by: Michael Tokarev Reviewed-by: Stefan Weil --- hw/virtio/virtio-qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: xen bits broke x32 build

2023-04-02 Thread Philippe Mathieu-Daudé
On 1/4/23 14:10, David Woodhouse wrote: On 1 April 2023 12:57:33 BST, Michael Tokarev wrote: 01.04.2023 14:45, Joao Martins пишет: On 01/04/2023 09:40, Michael Tokarev wrote: After bringing in xen guest support, qemu fails to build on x32: Adding the folks who added the feature too target/

Re: [PATCH v9] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-02 Thread Volker Rümelin
Am 28.03.23 um 15:08 schrieb Dorinda Bassey: Hi Dorinda, This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire au

Re: [PATCH 1/3] Revert "linux-user/arm: Take more care allocating commpage"

2023-04-02 Thread Philippe Mathieu-Daudé
On 1/4/23 06:51, Richard Henderson wrote: This reverts commit 4f5c67f8df7f26e559509c68c45e652709edd23f. This exposes bugs in target_mmap et al with respect to overflow with the final page of the guest address space. To be fixed in the next development cycle. Signed-off-by: Richard Henderson -

Re: [PATCH v2] hostmem-file: add offset option

2023-04-02 Thread Markus Armbruster
Alexander Graf writes: > Add an option for hostmem-file to start the memory object at an offset > into the target file. This is useful if multiple memory objects reside > inside the same target file, such as a device node. > > In particular, it's useful to map guest memory directly into /dev/mem

Re: [PATCH 04/11] qemu-options: finesse the recommendations around -blockdev

2023-04-02 Thread Markus Armbruster
Alex Bennée writes: > We are a bit premature in recommending -blockdev/-device as the best > way to configure block devices, especially in the common case. > Improve the language to hopefully make things clearer. > > Suggested-by: Michael Tokarev > Signed-off-by: Alex Bennée > --- > qemu-optio

Re: [PATCH 14/16] hw/i3c: remote_i3c: Add model

2023-04-02 Thread Jeremy Kerr
Hi Joe, > Adds a model to communicate to remote I3C devices over chardev. This > allows QEMU to communicate to I3C targets that exist outside of QEMU. Nice! I've been wanting something similar for a while, both for i2c and i3c busses, to the point of having a similar concept partly implemented.

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

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 tb

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 +++   target/loongarch/insn_trans/trans_lsx.

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: [PATCH

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 o

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 b

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 gen_get

[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 --- a/migration/mi

[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(-) d

[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 @@ -602

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

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

[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 + migration/ram-

[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 *p

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

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

[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 "qe

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

[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 +++ b

[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 9d1817ab7b..ca56

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

[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. Signed-o

[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 --- tests/qtes

[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. Signed-o

[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 --- tests/qtes

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

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: [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 h

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 a

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 = (old)env

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 : >    > https:/

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