Re: [PULL v2 00/35] ppc queue

2023-09-07 Thread Nicholas Piggin
On Fri Sep 8, 2023 at 8:15 AM AEST, Cédric Le Goater wrote: > On 9/7/23 21:10, Michael Tokarev wrote: > > 06.09.2023 17:36, Cédric Le Goater wrote: > > ... > >> ppc queue : > >> > >> * debug facility improvements > >> * timebase and decrementer fixes > >> * record-replay fixes > >> * TCG fixes >

[RESEND] qemu/timer: Add host ticks function for RISC-V

2023-09-07 Thread LIU Zhiwei
From: LIU Zhiwei Signed-off-by: LIU Zhiwei --- include/qemu/timer.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9a91cb1248..105767c195 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -979,6 +979,25

[PATCH] qemu/timer: Add host ticks function for RISC-V

2023-09-07 Thread LIU Zhiwei
From: LIU Zhiwei Signed-off-by: LIU Zhiwei --- include/qemu/timer.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9a91cb1248..ce0b66d122 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -979,6 +979,25

Re: [PATCH RESEND v5 03/57] target/loongarch: Use gen_helper_gvec_4_ptr for 4OP + env vector instructions

2023-09-07 Thread gaosong
在 2023/9/8 上午1:34, Richard Henderson 写道: On 9/7/23 01:31, Song Gao wrote: +static bool gen__ptr_vl(DisasContext *ctx, arg_ *a, uint32_t oprsz, +    gen_helper_gvec_4_ptr *fn) +{ +    tcg_gen_gvec_4_ptr(vec_full_offset(a->vd), +  

Re: [PATCH RESEND v5 02/57] target/loongarch: Implement gvec_*_vl functions

2023-09-07 Thread gaosong
在 2023/9/8 上午1:19, Richard Henderson 写道: On 9/7/23 01:31, Song Gao wrote: Using gvec_*_vl functions hides oprsz. We can use gvec_v* for oprsz 16. and gvec_v* for oprsz 32. Signed-off-by: Song Gao ---   target/loongarch/insn_trans/trans_vec.c.inc | 68 +   1 file changed, 44

[PATCH v4 02/16] tcg/loongarch64: Lower basic tcg vec ops to LSX

2023-09-07 Thread Jiajie Chen
LSX support on host cpu is detected via hwcap. Lower the following ops to LSX: - dup_vec - dupi_vec - dupm_vec - ld_vec - st_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target-con-str.h | 1 +

[PATCH v4 10/16] tcg/loongarch64: Lower vector saturated ops

2023-09-07 Thread Jiajie Chen
Lower the following ops: - ssadd_vec - usadd_vec - sssub_vec - ussub_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 33 insertions(+), 1

[PATCH v4 12/16] tcg/loongarch64: Lower bitsel_vec to vbitsel

2023-09-07 Thread Jiajie Chen
Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 11 ++- tcg/loongarch64/tcg-target.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git

[PATCH v4 03/16] tcg: pass vece to tcg_target_const_match()

2023-09-07 Thread Jiajie Chen
Pass vece to tcg_target_const_match() to allow correct interpretation of const args of vector ops. Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc | 2 +- tcg/i386/tcg-target.c.inc| 2 +-

[PATCH v4 15/16] tcg/loongarch64: Lower rotli_vec to vrotri

2023-09-07 Thread Jiajie Chen
Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 21 + tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc

[PATCH v4 13/16] tcg/loongarch64: Lower vector shift integer ops

2023-09-07 Thread Jiajie Chen
Lower the following ops: - shli_vec - shrv_vec - sarv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 21 + tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git

[PATCH v4 04/16] tcg/loongarch64: Lower cmp_vec to vseq/vsle/vslt

2023-09-07 Thread Jiajie Chen
Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target-con-str.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65 3 files changed, 67 insertions(+) diff --git

[PATCH v4 08/16] tcg/loongarch64: Lower mul_vec to vmul

2023-09-07 Thread Jiajie Chen
Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 8 tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index

[PATCH v4 06/16] tcg/loongarch64: Lower vector bitwise operations

2023-09-07 Thread Jiajie Chen
Lower the following ops: - and_vec - andc_vec - or_vec - orc_vec - xor_vec - nor_vec - not_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 ++ tcg/loongarch64/tcg-target.c.inc | 44

[PATCH v4 11/16] tcg/loongarch64: Lower vector shift vector ops

2023-09-07 Thread Jiajie Chen
Lower the following ops: - shlv_vec - shrv_vec - sarv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 24 tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git

[PATCH v4 00/16] Lower TCG vector ops to LSX

2023-09-07 Thread Jiajie Chen
This patch series allows qemu to utilize LSX instructions on LoongArch machines to execute TCG vector ops. Passed tcg tests with x86_64 and aarch64 cross compilers. Changes since v3: - Refactor add/sub_vec handling code to use a helper function - Only use vldx/vstx for MO_128 load/store,

[PATCH v4 14/16] tcg/loongarch64: Lower rotv_vec ops to LSX

2023-09-07 Thread Jiajie Chen
Lower the following ops: - rotrv_vec - rotlv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 14 ++ tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git

[PATCH v4 16/16] tcg/loongarch64: Implement 128-bit load & store

2023-09-07 Thread Jiajie Chen
If LSX is available, use LSX instructions to implement 128-bit load & store when MO_128 is required, otherwise use two 64-bit loads & stores. Signed-off-by: Jiajie Chen --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 59

[PATCH v4 09/16] tcg/loongarch64: Lower vector min max ops

2023-09-07 Thread Jiajie Chen
Lower the following ops: - smin_vec - smax_vec - umin_vec - umax_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-)

[PATCH v4 05/16] tcg/loongarch64: Lower add/sub_vec to vadd/vsub

2023-09-07 Thread Jiajie Chen
Lower the following ops: - add_vec - sub_vec Signed-off-by: Jiajie Chen --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target-con-str.h | 1 + tcg/loongarch64/tcg-target.c.inc | 61 3 files changed, 63 insertions(+) diff --git

[PATCH v4 07/16] tcg/loongarch64: Lower neg_vec to vneg

2023-09-07 Thread Jiajie Chen
Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 8 tcg/loongarch64/tcg-target.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index

[PULL 08/13] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" This patch also drops definition of some locals in main() to avoid useless data copy. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-3-...@openvz.org> Reviewed-by: Eric Blake Signed-off-by: Eric Blake

[PULL 06/13] util/iov: Avoid dynamic stack allocation

2023-09-07 Thread Eric Blake
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack

[PULL 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Closing stderr earlier is good for daemonized qemu-nbd under ssh earlier, but breaks the case where -v is being used to track what is happening in the server, as in iotest 233. When we know we are verbose, we should preserve original stderr and restore it once the setup

[PULL 00/13] NBD patches through 2023-09-07

2023-09-07 Thread Eric Blake
The following changes since commit 03a3a62fbd0aa5227e978eef3c67d3978aec9e5f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-09-07 10:29:06 -0400) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2023-09-07 for you to

[PULL 10/13] qemu-nbd: put saddr into into struct NbdClientOpts

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-5-...@openvz.org> Reviewed-by: Eric Blake

[PULL 05/13] io: follow coroutine AioContext in qio_channel_yield()

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi The ongoing QEMU multi-queue block layer effort makes it possible for multiple threads to process I/O in parallel. The nbd block driver is not compatible with the multi-queue block layer yet because QIOChannel cannot be used easily from coroutines running in multiple

[PULL 01/13] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Eric Blake
From: Andrey Drobyshev In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add testcase for CoR with subclusters") we've introduced a new testcase for copy-on-read with subclusters. Test 197 always forces qcow2 as the top image, but allows backing image to be in any format. That last

[PULL 09/13] qemu-nbd: move srcpath into struct NbdClientOpts

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-4-...@openvz.org> Reviewed-by: Eric Blake

[PULL 02/13] nbd: drop unused nbd_receive_negotiate() aio_context argument

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230830224802.493686-2-stefa...@redhat.com> Signed-off-by: Eric Blake --- include/block/nbd.h

[PULL 03/13] nbd: drop unused nbd_start_negotiate() aio_context argument

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230830224802.493686-3-stefa...@redhat.com> Signed-off-by: Eric Blake --- nbd/client.c | 11

[PULL 07/13] qemu-nbd: improve error message for dup2 error

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" This error happens if we are not able to close the pipe to the parent (to trace errors in the child process) and assign stderr to /dev/null as required by the daemonizing convention. Signed-off-by: Denis V. Lunev Suggested-by: Eric Blake CC: Eric Blake CC: Vladimir

[PULL 13/13] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-8-...@openvz.org> Reviewed-by: Eric Blake [eblake: Wording improvement] Signed-off-by: Eric Blake --- docs/tools/qemu-nbd.rst | 4 +++- 1 file changed, 3

[PULL 04/13] io: check there are no qio_channel_yield() coroutines during ->finalize()

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi Callers must clean up their coroutines before calling object_unref(OBJECT(ioc)) to prevent an fd handler leak. Add an assertion to check this. This patch is preparation for the fd handler changes that follow. Signed-off-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé

[PULL 11/13] qemu-nbd: invent nbd_client_release_pipe() helper

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Move the code from main() and nbd_client_thread() into the specific helper. This code is going to be grown. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-6-...@openvz.org> Reviewed-by: Eric Blake

Re: [PATCH] softmmu/dirtylimit: Fix usleep early return on signal

2023-09-07 Thread alloc young
On 2023/9/4 21:27, Yong Huang wrote: On Fri, Sep 1, 2023 at 10:19 AM > wrote: From: alloc mailto:alloc.yo...@outlook.com>> Timeout functions like usleep can return early on signal, which reduces more dirty pages than expected. In dirtylimit

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Wu, Fei
On 9/7/2023 11:46 PM, Anup Patel wrote: > On Tue, Aug 1, 2023 at 4:16 AM Daniel Henrique Barboza > wrote: >> >> >> >> On 7/30/23 22:53, Fei Wu wrote: >>> riscv virt platform's memory started at 0x8000 and >>> straddled the 4GiB boundary. Curiously enough, this choice >>> of a memory layout

Re: [PATCH v2 4/3] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Eric Blake
On Fri, Sep 08, 2023 at 01:07:18AM +0300, Andrey Drobyshev via wrote: > In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add > testcase for CoR with subclusters") we've introduced a new testcase for > copy-on-read with subclusters. Test 197 always forces qcow2 as the top > image, but

Re: riscv64 virt board crash upon startup

2023-09-07 Thread Laszlo Ersek
On 9/8/23 01:47, Laszlo Ersek wrote: > I don't know why qemu_console_is_multihead() used a lot of QOM > trickery for this in the first place, but here's what I'd propose as > fix -- simply try to locate a QemuGraphicConsole in "consoles" that > references the same "device" that *this*

Re: [PATCH v3 27/32] machine: Print CPU model name instead of CPU type name

2023-09-07 Thread Gavin Shan
On 9/7/23 19:05, Philippe Mathieu-Daudé wrote: On 7/9/23 02:35, Gavin Shan wrote: The names of supported CPU models instead of CPU types should be printed when the user specified CPU type isn't supported, to be consistent with the output from '-cpu ?'. Correct the error messages to print CPU

Re: riscv64 virt board crash upon startup

2023-09-07 Thread Laszlo Ersek
Question for Gerd below: On 9/7/23 14:29, Philippe Mathieu-Daudé wrote: > On 7/9/23 13:25, Laszlo Ersek wrote: >> This is with QEMU v8.1.0-391-gc152379422a2. >> >> I use the command line from (scroll to the bottom): >> >>    https://github.com/tianocore/edk2/commit/49f06b664018 >> >> (with

Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-07 Thread Gavin Shan
On 9/7/23 18:20, David Hildenbrand wrote: On 07.09.23 02:35, Gavin Shan wrote: For target/s390x, the CPU type name is always the combination of the CPU modle name and suffix. The CPU model names have been correctly shown in s390_print_cpu_model_list_entry() and create_cpu_model_list(). Use

Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names

2023-09-07 Thread Gavin Shan
On 9/7/23 18:31, Thomas Huth wrote: On 07/09/2023 02.35, Gavin Shan wrote: For target/s390x, the CPU type name is always the combination of the CPU modle name and suffix. The CPU model names have been correctly s/modle/model/ Thanks, will be fixed in next respin. Thanks, Gavin

Re: [PATCH v3 01/32] cpu: Add helper cpu_model_from_type()

2023-09-07 Thread Gavin Shan
On 9/7/23 18:54, Philippe Mathieu-Daudé wrote: On 7/9/23 02:35, Gavin Shan wrote: Add helper cpu_model_from_type() to extract the CPU model name from the CPU type name in two circumstances: (1) The CPU type name is the combination of the CPU model name and suffix. (2) The CPU type name is same

Re: [PATCH 8/8] qemu-nbd: fix formatting in main()

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:10AM +0200, Denis V. Lunev wrote: > Just a formatting, no functional changes. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > Do not really sure that this patch is mandatory, just stabs my eye. Feel free > to drop if

Re: [PULL v2 00/35] ppc queue

2023-09-07 Thread Cédric Le Goater
On 9/7/23 21:10, Michael Tokarev wrote: 06.09.2023 17:36, Cédric Le Goater wrote: ... ppc queue : * debug facility improvements * timebase and decrementer fixes * record-replay fixes * TCG fixes * XIVE model improvements for multichip

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-09-07 Thread Denis V. Lunev
On 9/7/23 22:11, Michael Tokarev wrote: 11.07.2023 20:25, Andrey Drobyshev via wrote: v1 --> v2:   * Fixed line indentation;   * Fixed wording in a comment;   * Added R-b. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html Andrey Drobyshev (3):    block: add

Re: [PATCH v2 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-09-07 Thread Andrey Drobyshev
On 9/6/23 12:43, Denis V. Lunev wrote: > On 7/11/23 19:25, Andrey Drobyshev wrote: >> Add testcase which checks that allocations during copy-on-read are >> performed on the subcluster basis when subclusters are enabled in target >> image. >> >> This testcase also triggers the following assert with

[PATCH v2 4/3] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Andrey Drobyshev via
In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add testcase for CoR with subclusters") we've introduced a new testcase for copy-on-read with subclusters. Test 197 always forces qcow2 as the top image, but allows backing image to be in any format. That last test case didn't meet

Re: [PATCH 7/8] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Denis V. Lunev
On 9/8/23 00:01, Eric Blake wrote: On Wed, Sep 06, 2023 at 11:32:09AM +0200, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- docs/tools/qemu-nbd.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 7/8] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:09AM +0200, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > docs/tools/qemu-nbd.rst | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/docs/tools/qemu-nbd.rst

Re: [PATCH 6/8] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:08AM +0200, Denis V. Lunev wrote: > Closing stderr earlier is good for daemonized qemu-nbd under ssh > earlier, but breaks the case where -v is being used to track what is > happening in the server, as in iotest 233. > > When we know we are verbose, we should

Re: [PATCH 5/8] qemu-nbd: invent nbd_client_release_pipe() helper

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:07AM +0200, Denis V. Lunev wrote: > Move the code from main() and nbd_client_thread() into the specific > helper. This code is going to be grown. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 23

[PATCH 1/1] block: improve alignment detection and fix 271 test

2023-09-07 Thread Denis V. Lunev
Unfortunately 271 IO test is broken if started in non-cached mode. Commits commit a6b257a08e3d72219f03e461a52152672fec0612 Author: Nir Soffer Date: Tue Aug 13 21:21:03 2019 +0300 file-posix: Handle undetectable alignment and commit 9c60a5d1978e6dcf85c0e01b50e6f7f54ca09104

Re: [PATCH 4/8] qemu-nbd: put saddr into into struct NbdClientOpts

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:06AM +0200, Denis V. Lunev wrote: > We pass other parameters into nbd_client_thread() in this way. This patch > makes the code more consistent. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 13

Re: [PATCH 3/8] qemu-nbd: move srcpath into struct NbdClientOpts

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:05AM +0200, Denis V. Lunev wrote: > We pass other parameters into nbd_client_thread() in this way. This patch > makes the code more consistent. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 17

Re: [PATCH 2/8] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:04AM +0200, Denis V. Lunev wrote: > This patch also drops definition of some locals in main() to avoid > useless data copy. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 60

Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command()

2023-09-07 Thread Stefan Hajnoczi
On Thu, 7 Sept 2023 at 16:53, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@gmail.com) wrote: > > On Thu, 7 Sept 2023 at 10:07, Dr. David Alan Gilbert > > wrote: > > > > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > On Thu, Sep 07, 2023 at 01:06:39AM +, Dr.

[PATCH v3 1/2] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-09-07 Thread Andrey Drobyshev via
Functions qcow2_get_host_offset(), get_cluster_offset(), vmdk_co_block_status() explicitly report compressed cluster types when data is compressed. However, this information is never passed further. Let's make use of it by adding new BDRV_BLOCK_COMPRESSED flag for bdrv_block_status(), so that

[PATCH v3 0/2] qemu-img: map: implement support for compressed clusters

2023-09-07 Thread Andrey Drobyshev via
v2 --> v3: * Make "compressed" field mandatory, not optional; * Adjust field description in qapi/block-core.json; * Squash patch 3 into patch 2 so that failing tests don't break bisect; * Update even more tests' outputs now that the field is mandatory. v2:

Re: [PATCH] hw/display/xlnx_dp: update comments

2023-09-07 Thread Michael Tokarev
07.09.2023 23:34, Michael Tokarev wrote: --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1,4 +1,4 @@ -/* +?* * Xilinx Display Port Without this glitch ofc, - already fixed. /mjt

Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command()

2023-09-07 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Thu, 7 Sept 2023 at 10:07, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Thu, Sep 07, 2023 at 01:06:39AM +, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: >

Re: [PATCH 1/8] qemu-nbd: improve error message for dup2 error

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:03AM +0200, Denis V. Lunev wrote: > This error is happened when we are not able to close the pipe to the s/is happened when/happens if/ > parent (to trace errors in the child process) and assign stderr to > /dev/null as required by the daemonizing convention. > >

Re: [PATCH v3 4/4] io: follow coroutine AioContext in qio_channel_yield()

2023-09-07 Thread Eric Blake
On Wed, Aug 30, 2023 at 06:48:02PM -0400, Stefan Hajnoczi wrote: > The ongoing QEMU multi-queue block layer effort makes it possible for multiple > threads to process I/O in parallel. The nbd block driver is not compatible > with > the multi-queue block layer yet because QIOChannel cannot be used

[PATCH] hw/display/xlnx_dp: update comments

2023-09-07 Thread Michael Tokarev
From: Peter Maydell Clarify somewhat misleading code comments. Signed-off-by: Michael Tokarev --- hw/display/xlnx_dp.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Peter, this is the result of your suggestions in this area. Since it's entirely your wording, can I specify

Re: [PATCH v2 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-09-07 Thread Laszlo Ersek
On 9/7/23 17:59, Eugenio Perez Martin wrote: > On Wed, Aug 30, 2023 at 3:41 PM Laszlo Ersek wrote: >> >> (1) The virtio-1.2 specification >> writes: >> >>> 3 General Initialization And Device Operation >>> 3.1 Device

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-09-07 Thread Michael Tokarev
11.07.2023 20:25, Andrey Drobyshev via wrote: v1 --> v2: * Fixed line indentation; * Fixed wording in a comment; * Added R-b. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html Andrey Drobyshev (3): block: add subcluster_size field to BlockDriverInfo

Re: [PATCH] meson.build: Make keyutils independent from keyring

2023-09-07 Thread Michael Tokarev
24.08.2023 12:42, Thomas Huth wrote: Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils") tried to provide a possibility for the user to disable keyutils if not required by makeing it depend on the keyring feature. This looked reasonable at a first glance (the unit test in

Re: [RFC PATCH] softmmu: Fix async_run_on_cpu() use in tcg_commit_cpu()

2023-09-07 Thread Philippe Mathieu-Daudé
On 7/9/23 18:28, Richard Henderson wrote: On 9/7/23 09:14, Philippe Mathieu-Daudé wrote: CPUState::halt_cond is an accelerator specific pointer, used in particular by TCG (which tcg_commit() is about). The pointer is set by the AccelOpsClass::create_vcpu_thread() handler.

Re: [PATCH] hw/net/vmxnet3: Fix guest-triggerable assert()

2023-09-07 Thread Michael Tokarev
17.08.2023 15:56, Thomas Huth wrote: The assert() that checks for valid MTU sizes can be triggered by the guest (e.g. with the reproducer code from the bug ticket https://gitlab.com/qemu-project/qemu/-/issues/517 ). Let's avoid this problem by simply logging the error and refusing to activate

Re: [PATCH] arm64: Restore trapless ptimer access

2023-09-07 Thread Michael Tokarev
31.08.2023 22:00, Colton Lewis wrote: Due to recent KVM changes, QEMU is setting a ptimer offset resulting in unintended trap and emulate access and a consequent performance hit. Filter out the PTIMER_CNT register to restore trapless ptimer access. Quoting Andrew Jones: Simply reading the CNT

[PATCH v1 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant. We fix this by making sure we zero the first byte of every testable page in range beforehand. Daniil

[PATCH v1 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the test instances from 150MiB to e.g 110MiB since

[PATCH v1 1/2] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-07 Thread Daniil Tatianin
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin --- tests/migration/i386/a-b-bootblock.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/migration/i386/a-b-bootblock.S

[PATCH 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the test instances from 150MiB to e.g 110MiB since

[PATCH 1/2] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-07 Thread Daniil Tatianin
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin --- tests/migration/i386/a-b-bootblock.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/migration/i386/a-b-bootblock.S

[PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant. We fix this by making sure we zero the first byte of every testable page in range beforehand. Daniil

Re: [virtio-dev] [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-07 Thread Stefan Hajnoczi
On Tue, Sep 05, 2023 at 10:34:11AM +0100, Alex Bennée wrote: > > Albert Esteve writes: > > > This looks great! Thanks for this proposal. > > > > On Fri, Sep 1, 2023 at 1:00 PM Alex Bennée wrote: > > > > Currently QEMU has to know some details about the VirtIO device > > supported by a

Re: [PATCH for-8.2 0/2] ppc: get rid of free() (gitlab #1798)

2023-09-07 Thread Michael Tokarev
30.07.2023 20:13, Daniel Henrique Barboza wrote: On 7/29/23 12:35, Peter Maydell wrote: On Fri, 28 Jul 2023 at 21:57, Daniel Henrique Barboza wrote: Here's some trivial changes following Peter's call to arms against free() and friends in gitlab issue #1798 in an attempt to enforce our

Re: [RFC PATCH v2] docs/interop: define PROBE feature for vhost-user VirtIO devices

2023-09-07 Thread Stefan Hajnoczi
On Fri, Sep 01, 2023 at 12:00:18PM +0100, Alex Bennée wrote: > Currently QEMU has to know some details about the VirtIO device > supported by a vhost-user daemon to be able to setup the guest. This > makes it hard for QEMU to add support for additional vhost-user > daemons without adding specific

Re: [PULL v2 00/35] ppc queue

2023-09-07 Thread Michael Tokarev
06.09.2023 17:36, Cédric Le Goater wrote: ... ppc queue : * debug facility improvements * timebase and decrementer fixes * record-replay fixes * TCG fixes * XIVE model improvements for multichip Cédric Le Goater (4):

Re: [PATCH 0/2] virtio: Drop out of coroutine context in virtio_load()

2023-09-07 Thread Stefan Hajnoczi
On Tue, Sep 05, 2023 at 04:50:00PM +0200, Kevin Wolf wrote: > This fixes a recently introduced assertion failure that was reported to > happen when migrating virtio-net with a failover. The latent bug that > we're executing code in coroutine context that was never supposed to run > there has

Re: [PATCH 2/2] virtio: Drop out of coroutine context in virtio_load()

2023-09-07 Thread Stefan Hajnoczi
On Tue, Sep 05, 2023 at 04:50:02PM +0200, Kevin Wolf wrote: > virtio_load() as a whole should run in coroutine context because it > reads from the migration stream and we don't want this to block. Is that "should" a "must" or a "can"? If it's a "must" then virtio_load() needs

Re: [PATCH v1 1/7] qapi: scripts: add a generator for qapi's examples

2023-09-07 Thread Victor Toso
Hi, On Wed, Sep 06, 2023 at 10:15:52AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 05, 2023 at 09:48:40PM +0200, Victor Toso wrote: > > This generator has two goals: > > 1. Mechanical validation of QAPI examples > > 2. Generate the examples in a JSON format to be consumed for extra > >

[PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi Message-id:

Re: [PATCH v1 0/7] Validate and test qapi examples

2023-09-07 Thread Victor Toso
Hi, Thanks for the quick review Daniel! On Wed, Sep 06, 2023 at 10:17:04AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 05, 2023 at 09:48:39PM +0200, Victor Toso wrote: > > Hi, > > > > This is a follow up from the RFC sent in the end of 08-2022: > >

[PULL 3/5] hw/ufs: Support for Query Transfer Requests

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 5/5] tests/qtest: Introduce tests for UFS

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This patch includes the following tests Test mmio read Test ufs device initialization and ufs-lu recognition Test I/O (Performs a write followed by a read to verify) Signed-off-by: Jeuk Kim Acked-by: Thomas Huth Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 0/5] Block patches

2023-09-07 Thread Stefan Hajnoczi
The following changes since commit 03a3a62fbd0aa5227e978eef3c67d3978aec9e5f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-09-07 10:29:06 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to

[PULL 2/5] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI device. Patches to

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Michael Tokarev
07.09.2023 19:54, John Snow wrote: .. > > > Niklas Cassel (7): >    hw/ide/core: set ERR_STAT in unsupported command completion >    hw/ide/ahci: write D2H FIS when processing NCQ command >   

[PULL 1/5] iothread: Set the GSource "name" field

2023-09-07 Thread Stefan Hajnoczi
From: Fabiano Rosas Having a name in the source helps with debugging core dumps when one might not have access to TLS data to cross-reference AioContexts with their addresses. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Message-id: 20230905180359.14083-1-faro...@suse.de

Re: [PATCH v10 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-09-07 Thread Stefan Hajnoczi
On Wed, 6 Sept 2023 at 03:45, Jeuk Kim wrote: > > Since v9: > - Added the "UFS_" prefix to all define and enum defined in block/ufs.h. > This fixes > https://gitlab.com/qemu-project/qemu/-/jobs/4977255992 > which is a win32 build error. > > - Fixed not to use pointer type casting (uint32_t * ->

Re: [PATCH RESEND v5 03/57] target/loongarch: Use gen_helper_gvec_4_ptr for 4OP + env vector instructions

2023-09-07 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: +static bool gen__ptr_vl(DisasContext *ctx, arg_ *a, uint32_t oprsz, +gen_helper_gvec_4_ptr *fn) +{ +tcg_gen_gvec_4_ptr(vec_full_offset(a->vd), + vec_full_offset(a->vj), +

Re: [PATCH RESEND v5 02/57] target/loongarch: Implement gvec_*_vl functions

2023-09-07 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Using gvec_*_vl functions hides oprsz. We can use gvec_v* for oprsz 16. and gvec_v* for oprsz 32. Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_vec.c.inc | 68 + 1 file changed, 44 insertions(+), 24 deletions(-) The

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread John Snow
On Thu, Sep 7, 2023, 12:49 PM Michael Tokarev wrote: > 07.09.2023 06:42, John Snow wrote: > > > > > IDE Pull request > > > > > > > > Niklas Cassel (7): > >

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Michael Tokarev
07.09.2023 06:42, John Snow wrote: IDE Pull request Niklas Cassel (7): hw/ide/core: set ERR_STAT in unsupported command completion hw/ide/ahci: write D2H FIS

Re: [PATCH RESEND v5 01/57] target/loongarch: Renamed lsx*.c to vec* .c

2023-09-07 Thread Richard Henderson
On 9/7/23 01:31, Song Gao wrote: Renamed lsx_helper.c to vec_helper.c and trans_lsx.c.inc to trans_vec.c.inc So LASX can used them. Signed-off-by: Song Gao --- target/loongarch/translate.c| 2 +- target/loongarch/{lsx_helper.c => vec_helper.c}

Re: [RFC PATCH] softmmu: Fix async_run_on_cpu() use in tcg_commit_cpu()

2023-09-07 Thread Richard Henderson
On 9/7/23 09:14, Philippe Mathieu-Daudé wrote: CPUState::halt_cond is an accelerator specific pointer, used in particular by TCG (which tcg_commit() is about). The pointer is set by the AccelOpsClass::create_vcpu_thread() handler. AccelOpsClass::create_vcpu_thread() is called by the generic

Re: [PATCH v3 30/32] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()

2023-09-07 Thread Leif Lindholm
On Thu, Sep 07, 2023 at 10:35:51 +1000, Gavin Shan wrote: > Set mc->valid_cpu_types so that the user specified CPU type can > be validated in machine_run_board_init(). We needn't to do it > by ourselves. > > Signed-off-by: Gavin Shan Reviewed-by: Leif Lindholm > --- > hw/arm/sbsa-ref.c | 21

  1   2   3   4   >