[PULL 13/18] libvduse: Add support for reconnecting

2022-06-09 Thread Kevin Wolf
From: Xie Yongji To support reconnecting after restart or crash, VDUSE backend might need to resubmit inflight I/Os. This stores the metadata such as the index of inflight I/O's descriptors to a shm file so that VDUSE backend can restore them during reconnecting. Signed-off-by: Xie Yongji

[PATCH 2/2] linux-aio: explain why max batch is checked in laio_io_unplug()

2022-06-09 Thread Stefan Hajnoczi
It may not be obvious why laio_io_unplug() checks max batch. I discussed this with Stefano and have added a comment summarizing the reason. Cc: Stefano Garzarella Cc: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/linux-aio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PULL 00/18] Block layer patches

2022-06-09 Thread Kevin Wolf
The following changes since commit 028f2361d0c2d28d6f918fe618f389228ac22b60: Merge tag 'pull-target-arm-20220609' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-09 06:47:03 -0700) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags

Re: [PATCH v15 2/9] linux-user: Add LoongArch signal support

2022-06-09 Thread Richard Henderson
On 6/8/22 19:42, Song Gao wrote: +struct target_sigcontext { +uint64_t sc_pc; +uint64_t sc_regs[32]; +uint32_t sc_flags; +uint64_t sc_extcontext[0] __attribute__((aligned(16))); +}; + +struct target_fpu_context { +uint64_t fc_regs[32]; +uint64_t fc_fcc; +uint32_t

Re: [PATCH 17/20] migration: remove the QEMUFileOps 'get_buffer' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the get_buffer logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé > --- > migration/qemu-file-channel.c | 29 - > migration/qemu-file.c | 18 -- >

Re: [PATCH v15 6/9] default-configs: Add loongarch linux-user support

2022-06-09 Thread Richard Henderson
On 6/8/22 19:42, Song Gao wrote: This patch adds loongarch64 linux-user default configs file. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- configs/targets/loongarch64-linux-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644

[PULL 12/18] vduse-blk: Add vduse-blk resize support

2022-06-09 Thread Kevin Wolf
From: Xie Yongji To support block resize, this uses vduse_dev_update_config() to update the capacity field in configuration space and inject config interrupt on the block resize callback. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id:

Re: [PATCH v2 20/25] target/arm: Introduce helper_exception_with_syndrome

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:08, Richard Henderson wrote: > > With the helper we can use exception_target_el at runtime, > instead of default_exception_el at translate time. > While we're at it, remove the DisasContext parameter from > gen_exception, as it is no longer used. > > Signed-off-by:

Re: [PATCH v2 16/25] target/arm: Move gen_exception to translate.c

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:01, Richard Henderson wrote: > > This function is not required by any other translation file. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

[PULL 06/18] block: Support passing NULL ops to blk_set_dev_ops()

2022-06-09 Thread Kevin Wolf
From: Xie Yongji This supports passing NULL ops to blk_set_dev_ops() so that we can remove stale ops in some cases. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id: <20220523084611.91-2-xieyon...@bytedance.com> Signed-off-by: Kevin Wolf --- block/block-backend.c | 2 +- 1

[PATCH 1/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-09 Thread Stefan Hajnoczi
Every laio_io_plug() call has a matching laio_io_unplug() call. There is a plugged counter that tracks the number of levels of plugging and allows for nesting. The plugged counter must reflect the balance between laio_io_plug() and laio_io_unplug() calls accurately. Otherwise I/O stalls occur

[PULL 11/18] vduse-blk: Implement vduse-blk export

2022-06-09 Thread Kevin Wolf
From: Xie Yongji This implements a VDUSE block backends based on the libvduse library. We can use it to export the BDSs for both VM and container (host) usage. The new command-line syntax is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export

[PULL 17/18] aio_wait_kick: add missing memory barrier

2022-06-09 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito It seems that aio_wait_kick always required a memory barrier or atomic operation in the caller, but nobody actually took care of doing it. Let's put the barrier in the function instead, and pair it with another one in AIO_WAIT_WHILE. Read aio_wait_kick() comment

Re: [PATCH v2 23/25] target/arm: Move arm_debug_target_el to debug_helper.c

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:02, Richard Henderson wrote: > > This function is no longer used outside debug_helper.c. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 15/25] target/arm: Remove TBFLAG_ANY.DEBUG_TARGET_EL

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:54, Richard Henderson wrote: > > We no longer need this value during translation, > as it is now handled within the helpers. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

[PULL 03/18] block: block_dirty_bitmap_merge(): fix error path

2022-06-09 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy At the end we ignore failure of bdrv_merge_dirty_bitmap() and report success. And still set errp. That's wrong. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin Reviewed-by: Kevin Wolf Message-Id:

Re: [PATCH v2 18/25] target/arm: Introduce gen_exception

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:07, Richard Henderson wrote: > > Create a new wrapper function that passes the default > exception target to gen_exception_el. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 22/25] target/arm: Create raise_exception_debug

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:12, Richard Henderson wrote: > > Handle the debug vs current el exception test in one place. > Leave EXCP_BKPT alone, since that treats debug < current differently. > > Signed-off-by: Richard Henderson > --- > target/arm/debug_helper.c | 44

[PULL 18/18] nbd: Drop dead code spotted by Coverity

2022-06-09 Thread Kevin Wolf
From: Eric Blake CID 1488362 points out that the second 'rc >= 0' check is now dead code. Reported-by: Peter Maydell Fixes: 172f5f1a40(nbd: remove peppering of nbd_client_connected) Signed-off-by: Eric Blake Message-Id: <20220516210519.76135-1-ebl...@redhat.com> Reviewed-by: Peter Maydell

Re: [PATCH v2 25/25] target/arm: Fix Secure PL1 tests in fp_exception_el

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:02, Richard Henderson wrote: > > We were using arm_is_secure and is_a64, which are > tests against the current EL, as opposed to > arm_el_is_aa64 and arm_is_secure_below_el3, which > can be applied to a different EL than current. > Consolidate the two tests. > >

Re: [PATCH 14/20] migration: remove the QEMUFileOps 'shut_down' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > This directly implements the shutdown logic using QIOChannel APIs. > > > > > > Signed-off-by: Daniel P. Berrangé

[PULL 08/18] block/export: Abstract out the logic of virtio-blk I/O process

2022-06-09 Thread Kevin Wolf
From: Xie Yongji Abstract the common logic of virtio-blk I/O process to a function named virtio_blk_process_req(). It's needed for the following commit. Signed-off-by: Xie Yongji Message-Id: <20220523084611.91-4-xieyon...@bytedance.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf

Re: [PATCH v2 12/25] target/arm: Rename gen_exception_insn to gen_exception_insn_el

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:51, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.h| 4 ++-- > target/arm/translate-a64.c| 30 +-- > target/arm/translate-m-nocp.c | 16 +++--- > target/arm/translate-mve.c| 4

Re: [PATCH 14/20] migration: remove the QEMUFileOps 'shut_down' callback

2022-06-09 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > This directly implements the shutdown logic using QIOChannel APIs. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > migration/qemu-file-channel.c | 27

[PATCH 0/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-09 Thread Stefan Hajnoczi
An unlucky I/O pattern can result in stalled Linux AIO requests when the plugged counter becomes unbalanced. See Patch 1 for details. Patch 2 adds a comment to explain why the laio_io_unplug() even checks max batch in the first place. Stefan Hajnoczi (2): linux-aio: fix unbalanced plugged

[PULL 15/18] block/rbd: report a better error when namespace does not exist

2022-06-09 Thread Kevin Wolf
From: Stefano Garzarella If the namespace does not exist, rbd_create() fails with -ENOENT and QEMU reports a generic "error rbd create: No such file or directory": $ qemu-img create rbd:rbd/namespace/image 1M Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576 qemu-img:

Re: [PATCH 2/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-06-09 Thread Igor Mammedov
On Thu, 26 May 2022 22:40:05 +0800 Gavin Shan wrote: > Hi Igor, > > On 5/26/22 8:25 PM, Igor Mammedov wrote: > > On Wed, 18 May 2022 17:21:40 +0800 > > Gavin Shan wrote: > > > >> The {socket, cluster, core} IDs detected from Linux guest aren't > >> matching with what have been provided in

Re: [PATCH v2 13/25] target/arm: Introduce gen_exception_insn

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:03, Richard Henderson wrote: > > Create a new wrapper function that passes the default > exception target to gen_exception_insn_el. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 21/25] target/arm: Remove default_exception_el

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:18, Richard Henderson wrote: > > This function is no longer used. At the same time, remove > DisasContext.secure_routed_to_el3, as it in turn becomes unused. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

[PULL 14/18] qsd: document vduse-blk exports

2022-06-09 Thread Kevin Wolf
From: Stefan Hajnoczi Document vduse-blk exports in qemu-storage-daemon --help and the qemu-storage-daemon(1) man page. Based-on: <20220523084611.91-1-xieyon...@bytedance.com> Cc: Xie Yongji Signed-off-by: Stefan Hajnoczi Message-Id: <20220525121947.859820-1-stefa...@redhat.com>

Re: [PATCH v2 11/25] target/arm: Introduce gen_exception_insn_el_v

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:57, Richard Henderson wrote: > > Create a function below gen_exception_insn that takes > the target_el as a TCGv_i32, replacing gen_exception_el. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 16/20] migration: remove the QEMUFileOps 'close' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the close logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 12 > migration/qemu-file.c | 12

[PULL 09/18] linux-headers: Add vduse.h

2022-06-09 Thread Kevin Wolf
From: Xie Yongji This adds vduse header to linux headers so that the relevant VDUSE API can be used in subsequent patches. Signed-off-by: Xie Yongji Reviewed-by: Stefan Hajnoczi Message-Id: <20220523084611.91-5-xieyon...@bytedance.com> Signed-off-by: Kevin Wolf ---

Re: [PATCH v4 15/53] semihosting: Remove GDB_O_BINARY

2022-06-09 Thread Richard Henderson
On 6/9/22 08:49, Alex Bennée wrote: Richard Henderson writes: The value is zero, and gdb always opens files in binary mode. Signed-off-by: Richard Henderson It might be worth mentioning these are the FILEIO_ flags in include/gdb/fileio.h to make future referencing easier. Comment added

Re: [PATCH 13/20] migration: remove unused QEMUFileGetFD typedef

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file.h | 4 > 1 file changed, 4 deletions(-) > > diff --git a/migration/qemu-file.h b/migration/qemu-file.h > index 07c86bfea3..674c2c409b

Re: [PATCH v2 17/25] target/arm: Rename gen_exception to gen_exception_el

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:58, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 3/3] target/mips: implement Octeon-specific arithmetic instructions

2022-06-09 Thread Richard Henderson
On 6/9/22 01:23, Pavel Dovgalyuk wrote: +static bool trans_BADDU(DisasContext *ctx, arg_BADDU *a) +{ +TCGv t0, t1; + +if (a->rt == 0) { +/* nop */ +return true; +} I believe that we're standardizing on using gen_store_gpr, and not checking for r0 everywhere.

Re: [PATCH 20/20] migration: remove the QEMUFileOps abstraction

2022-06-09 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 05:59:00PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > Now that all QEMUFile callbacks are removed, the entire concept can be > > deleted. > > > > Signed-off-by: Daniel P. Berrangé > > I think that's OK, there's one nit -

Re: [PATCH v2 10/25] target/arm: Rename helper_exception_with_syndrome

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:54, Richard Henderson wrote: > > Rename to helper_exception_with_syndrome_el, to emphasize > that the target el is a parameter. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 03/25] target/arm: Move fp access syndrome adjust out of raise_exception

2022-06-09 Thread Richard Henderson
On 6/9/22 08:59, Peter Maydell wrote: On Tue, 7 Jun 2022 at 03:50, Richard Henderson wrote: Create helper_exception_advsimdfp_access to handle both the routing and the syndrome contents, depending on the eventual target EL and mode. Bit awkward to have "TGE means go to EL2, not EL1" in two

RE: What to do with the nanomips disassembler (was: [PATCH] disas: Remove libvixl disassembler)

2022-06-09 Thread Vince Del Vecchio via
On Thu, Jun 9, 2022 at 10:34AM, Thomas Huth wrote: > On 09/06/2022 16.15, Claudio Fontana wrote: >> On 6/9/22 13:27, Claudio Fontana wrote: >>> On 6/9/22 10:57, Daniel P. Berrangé wrote: On Thu, Jun 09, 2022 at 10:47:24AM +0200, Thomas Huth wrote: > On 08/06/2022 17.51, Paolo Bonzini

Re: [PATCH v2 09/25] target/arm: Move arm_debug_exception_fsr to debug_helper.c

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:51, Richard Henderson wrote: > > This function now now only used in debug_helper.c, so there is > no reason to have a declaration in a header. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 19/20] migration: remove the QEMUFileOps 'get_return_path' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the get_return_path logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 16 > migration/qemu-file.c

Re: [PATCH v4 14/53] semihosting: Move common-semi.h to include/semihosting/

2022-06-09 Thread Alex Bennée
Richard Henderson writes: > This header is not private to the top-level semihosting directory, > so place it in the public include directory. Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 03/25] target/arm: Move fp access syndrome adjust out of raise_exception

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:50, Richard Henderson wrote: > > Create helper_exception_advsimdfp_access to handle both > the routing and the syndrome contents, depending on the > eventual target EL and mode. Bit awkward to have "TGE means go to EL2, not EL1" in two places now, but I'm going to assume

Re: [PATCH 15/20] migration: remove the QEMUFileOps 'set_blocking' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the set_blocking logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file-channel.c | 14 -- > migration/qemu-file.c | 4

Re: [PATCH v4 18/53] include/exec: Define errno values in gdbstub.h

2022-06-09 Thread Alex Bennée
Richard Henderson writes: > Define constants for the errno values defined by the > gdb remote fileio protocol. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 40/71] target/arm: Move pred_{full, gvec}_reg_{offset, size} to translate-a64.h

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:36, Richard Henderson wrote: > > We will need these functions in translate-sme.c. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 39/71] target/arm: Add SVL to TB flags

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > We need SVL separate from VL for RDSVL at al, as well as > ZA storage loads and stores, which do not require PSTATE.SM. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 12/20] migration: introduce new constructors for QEMUFile

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > Prepare for the elimination of QEMUFileOps by introducing a pair of new > constructors. This lets us distinguish between an input and output file > object explicitly rather than via the existance of specific callbacks. > > Signed-off-by: Daniel

Re: [PATCH v2 02/25] target/arm: Add coproc parameter to syn_fp_access_trap

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:47, Richard Henderson wrote: > > With ARMv8, this field is always RES0. > With ARMv7, targeting EL2 and TA=0, it is always 0xA. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 19/25] target/arm: Introduce gen_exception_el_v

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 04:08, Richard Henderson wrote: > > Split out a common helper function for gen_exception_el > and gen_exception_insn_el_v. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v5 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-06-09 Thread Alberto Faria
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is negative, making them consistent with bdrv_{preadv,pwritev}() and bdrv_co_{pread,pwrite,preadv,pwritev}(). bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and clears the BDRV_REQ_MAY_UNMAP flag when

Re: [PATCH v4 15/53] semihosting: Remove GDB_O_BINARY

2022-06-09 Thread Alex Bennée
Richard Henderson writes: > The value is zero, and gdb always opens files in binary mode. > > Signed-off-by: Richard Henderson It might be worth mentioning these are the FILEIO_ flags in include/gdb/fileio.h to make future referencing easier. Anyway: Reviewed-by: Alex Bennée > --- >

Re: [PATCH v2 31/71] target/arm: Move error for sve%d property to arm_cpu_sve_finalize

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Keep all of the error messages together. This does mean that > when setting many sve length properties we'll only generate > one error, but we only really need one. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell

Re: [PATCH v2 14/25] target/arm: Create helper_exception_swstep

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:58, Richard Henderson wrote: > > Move the computation from gen_swstep_exception into a helper. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.h | 1 + > target/arm/translate.h| 12 +++- > target/arm/debug_helper.c | 16

[PATCH v4 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()

2022-06-09 Thread Alberto Faria
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush() separately. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/qcow2.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index f2fb54c51f..90a2dd406b

Re: [PATCH v2 41/71] target/arm: Add infrastructure for disas_sme

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:36, Richard Henderson wrote: > > This includes the build rules for the decoder, and the > new file for translation, but excludes any instructions. > > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.h | 1 + > target/arm/translate-a64.c | 7 ++- >

[PATCH v5 08/10] block: Add bdrv_co_pwrite_sync()

2022-06-09 Thread Alberto Faria
Also convert bdrv_pwrite_sync() to being implemented using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/io.c | 9 + include/block/block-io.h | 8 ++-- 2 files changed, 11 insertions(+), 6

[PATCH v4 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn

2022-06-09 Thread Alberto Faria
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the callers are already coroutine_fn. Signed-off-by: Alberto Faria Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 2 +- block/qcow2-snapshot.c | 6 +++--- block/qcow2.c | 4 ++-- 3 files

[PATCH v5 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t

2022-06-09 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement bdrv_{pread,pwrite}() using generated_co_wrapper. unsigned int fits in int64_t, so all callers remain correct. bdrv_check_request32() is called further down the stack and causes -EIO to be returned if 'bytes' is negative

Re: [PATCH v2 38/71] target/arm: Introduce sve_vqm1_for_el_sm

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > When Streaming SVE mode is enabled, the size is taken from > SMCR_ELx instead of ZCR_ELx. The format is shared, but the > set of vector lengths is not. Further, Streaming SVE does > not require any particular length to be supported. > >

Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-09 Thread Anup Patel
On Thu, Jun 9, 2022 at 7:28 PM Richard Henderson wrote: > > On 6/8/22 20:16, Anup Patel wrote: > > On Wed, Jun 8, 2022 at 10:23 PM Richard Henderson > > wrote: > >> > >> On 6/8/22 09:14, Anup Patel wrote: > >>> +struct isa_ext_data isa_edata_arr[] = { > >> > >> static const? > > > > Using

[PATCH v4 08/10] block: Add bdrv_co_pwrite_sync()

2022-06-09 Thread Alberto Faria
Also convert bdrv_pwrite_sync() to being implemented using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/io.c | 9 + include/block/block-io.h | 8 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/block/io.c

[PATCH v5 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success

2022-06-09 Thread Alberto Faria
They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes are not possible. The few callers that

Re: [PATCH 14/20] migration: remove the QEMUFileOps 'shut_down' callback

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This directly implements the shutdown logic using QIOChannel APIs. > > Signed-off-by: Daniel P. Berrangé > --- > migration/qemu-file-channel.c | 27 --- > migration/qemu-file.c | 10 +++--- >

Re: [PATCH v2 35/71] target/arm: Move arm_cpu_*_finalize to internals.h

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Drop the aa32-only inline fallbacks, > and just use a couple of ifdefs. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.h | 6 -- > target/arm/internals.h | 3 +++ > target/arm/cpu.c | 2 ++ > 3 files changed,

[PATCH v4 04/10] crypto: Make block callbacks return 0 on success

2022-06-09 Thread Alberto Faria
They currently return the value of their headerlen/buflen parameter on success. Returning 0 instead makes it clear that short reads/writes are not possible. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake --- block/crypto.c | 52 +-

[PATCH v5 05/10] block: Make bdrv_co_pwrite() take a const buffer

2022-06-09 Thread Alberto Faria
It does not mutate the buffer. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- include/block/block_int-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h index

[PATCH v5 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}()

2022-06-09 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes; @@ - bdrv_pread(child, offset, buf, bytes) + bdrv_pread(child, offset, buf, bytes, 0)

[PATCH v4 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}()

2022-06-09 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes; @@ - bdrv_pread(child, offset, buf, bytes) + bdrv_pread(child, offset, buf, bytes, 0)

Re: [PATCH v2 34/71] target/arm: Generalize cpu_arm_{get, set}_default_vec_len

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Rename from cpu_arm_{get,set}_sve_default_vec_len, > and take the pointer to default_vq from opaque. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 08/25] target/arm: Move exception_bkpt_insn to debug_helper.c

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:53, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/debug_helper.c | 31 +++ > target/arm/op_helper.c| 29 - > 2 files changed, 31 insertions(+), 29 deletions(-) > Reviewed-by:

Re: [PATCH v2 33/71] target/arm: Generalize cpu_arm_{get,set}_vq

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Rename from cpu_arm_{get,set}_sve_vq, and take the > ARMVQMap as the opaque parameter. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 21/71] target/arm: Implement TPIDR2_EL0

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > This register is part of SME, but isn't closely related to the > rest of the extension. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.h| 1 + > target/arm/helper.c | 32 > 2 files

[PATCH v4 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper

2022-06-09 Thread Alberto Faria
Start by making the interfaces of analogous non-coroutine and coroutine functions consistent with each other, then implement the non-coroutine ones using generated_co_wrapper. For the bdrv_pwrite_sync() case, also add the missing bdrv_co_pwrite_sync() function. Changes v3 --> v4: - Removed

Re: [PATCH v2 32/71] target/arm: Create ARMVQMap

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Pull the three sve_vq_* values into a structure. > This will be reused for SME. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.h| 29 ++--- > target/arm/cpu64.c | 22 +++--- >

Re: [PATCH v2 00/71] target/arm: Scalable Matrix Extension

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: I took the first 20 patches of this into target-arm.next to cut it down to size a bit, but will continue to review the other two-thirds. -- PMM

Re: [PATCH v2 04/25] target/arm: Move exception_target_el out of line

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 03:49, Richard Henderson wrote: > > Move the function to op_helper.c, near raise_exception. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 0/7] copy-before-write: on-cbw-error and cbw-timeout

2022-06-09 Thread Vladimir Sementsov-Ogievskiy
On 5/26/22 21:51, Vladimir Sementsov-Ogievskiy wrote: On 5/26/22 19:46, Vladimir Sementsov-Ogievskiy wrote: On 4/7/22 16:27, Vladimir Sementsov-Ogievskiy wrote: Hi all! v4: Now based on master 01: add assertion and r-b 02: s/7.0/7.1/ and r-b 03: switch to QEMUMachine, touch-up pylintrc,  drop

[PATCH v5 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn

2022-06-09 Thread Alberto Faria
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the callers are already coroutine_fn. Signed-off-by: Alberto Faria Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi --- block/parallels.c | 2 +- block/qcow2-snapshot.c | 6 +++--- block/qcow2.c

Re: [PATCH 11/20] migration: hardcode assumption that QEMUFile is backed with QIOChannel

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > The only callers of qemu_fopen_ops pass 'true' for the 'has_ioc' > parameter, so hardcode this assumption in QEMUFile, by passing in > the QIOChannel object as a non-opaque parameter. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr.

[PATCH v4 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper

2022-06-09 Thread Alberto Faria
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is negative, making them consistent with bdrv_{preadv,pwritev}() and bdrv_co_{pread,pwrite,preadv,pwritev}(). bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and clears the BDRV_REQ_MAY_UNMAP flag when

Re: [PATCH 4/4] virtio-mmio: cleanup reset

2022-06-09 Thread Paolo Bonzini
On 6/9/22 14:22, Cornelia Huck wrote: -if (proxy->legacy) { -return; -} +virtio_bus_reset(>bus); -for (i = 0; i < VIRTIO_QUEUE_MAX; i++) { -proxy->vqs[i].enabled = 0; +if (!proxy->legacy) { +for (i = 0; i < VIRTIO_QUEUE_MAX; i++) { +

[PATCH v5 04/10] crypto: Make block callbacks return 0 on success

2022-06-09 Thread Alberto Faria
They currently return the value of their headerlen/buflen parameter on success. Returning 0 instead makes it clear that short reads/writes are not possible. Signed-off-by: Alberto Faria Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/crypto.c | 52

[PATCH v4 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t

2022-06-09 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement bdrv_{pread,pwrite}() using generated_co_wrapper. unsigned int fits in int64_t, so all callers remain correct. bdrv_check_request32() is called further down the stack and causes -EIO to be returned if 'bytes' is negative

Re: [PATCH] main loop: add missing documentation links to GS/IO macros

2022-06-09 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 08:22:06AM -0400, Emanuele Giuseppe Esposito wrote: > If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE > definition, we just find that they "mark and check that the function > is part of the {category} API". > However, ther is no definition on what

[PATCH 8/8] virtio-blk: remove unnecessary AioContext lock from function already safe

2022-06-09 Thread Emanuele Giuseppe Esposito
AioContext lock was introduced in b9e413dd375 and in this instance it is used to protect these 3 functions: - virtio_blk_handle_rw_error - virtio_blk_req_complete - block_acct_done Now that all three of the above functions are protected with their own locks, we can get rid of the AioContext lock.

[PATCH v5 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper

2022-06-09 Thread Alberto Faria
Start by making the interfaces of analogous non-coroutine and coroutine functions consistent with each other, then implement the non-coroutine ones using generated_co_wrapper. For the bdrv_pwrite_sync() case, also add the missing bdrv_co_pwrite_sync() function. Changes v4 --> v5: - Picking up a

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-09 Thread John Levon
On Thu, Jun 09, 2022 at 08:29:30AM -0600, Keith Busch wrote: > On Wed, Jun 08, 2022 at 10:55:30PM +0200, Klaus Jensen wrote: > > > > Keith, is this a bug in the kernel? If the code here would expect the > > doorbell buffer to be updated for the admin queue as well, would we > > break? > > The

[PATCH 3/8] virtio_blk_process_queued_requests: always run in a bh

2022-06-09 Thread Emanuele Giuseppe Esposito
This function in virtio_blk_data_plane_start is directly invoked, accessing the queued requests from the main loop, while the device has already switched to the iothread context. The only place where calling virtio_blk_process_queued_requests from the main loop is allowed is when

[PATCH] dbus-display: fix test race when initializing p2p connection

2022-06-09 Thread marcandre . lureau
From: Marc-André Lureau The D-Bus connection starts processing messages before QEMU has the time to set the object manager server. This is causing dbus-display-test to fail randomly with: ERROR:../tests/qtest/dbus-display-test.c:68:test_dbus_display_vm: assertion failed

[PATCH v4 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order

2022-06-09 Thread Alberto Faria
Swap 'buf' and 'bytes' around for consistency with bdrv_co_{pread,pwrite}(), and in preparation to implement these functions using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pread(child, offset, buf,

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-09 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 07:33:01AM +, Het Gala wrote: > > As of now, the multi-FD feature supports connection over the default network > only. This Patchset series is a Qemu side implementation of providing multiple > interfaces support for multi-FD. This enables us to fully utilize dedicated

Re: [PATCH v2 25/71] target/arm: Add SVCR

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > This cpreg is used to access two new bits of PSTATE > that are not visible via any other mechanism. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

[PATCH 0/8] virtio-blk: removal of AioContext lock

2022-06-09 Thread Emanuele Giuseppe Esposito
This serie aims to free virtio-blk (and in the future all virtio devices) from the AioContext lock. First step is to understand which functions are running in the main loop and which are in iothreads. Because many functions in virtio-blk are callbacks called in some other virtio (pci, mmio, bus

Re: [PATCH v2 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-09 Thread Igor Mammedov
On Fri, 20 May 2022 11:56:02 +0200 Li Zhang wrote: > When no memory backend is specified in machine options, > a default memory device will be added with default_ram_id. > However, if a memory backend object is added in QEMU options > and id is the same as default_ram_id, a coredump happens. >

Re: [PATCH v4 13/53] semihosting: Return void from do_common_semihosting

2022-06-09 Thread Alex Bennée
Richard Henderson writes: > Perform the cleanup in the FIXME comment in common_semi_gdb_syscall. > Do not modify guest registers until the syscall is complete, > which in the gdbstub case is asynchronous. > > In the synchronous non-gdbstub case, use common_semi_set_ret > to set the result.

Re: [PULL 00/55] target-arm queue

2022-06-09 Thread Richard Henderson
://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220609 for you to fetch changes up to 414c54d515dba16bfaef643a8acec200c05f229a: target/arm: Add ID_AA64SMFR0_EL1 (2022-06-08 19:38:59 +0100) target-arm queue

[PATCH 5/8] virtio-blk: mark GLOBAL_STATE_CODE functions

2022-06-09 Thread Emanuele Giuseppe Esposito
Just as done in the block API, mark functions in virtio-blk that are always called in the main loop with BQL held. We know such functions are GS because they all are callbacks from virtio.c API that has already classified them as GS. Signed-off-by: Emanuele Giuseppe Esposito ---

<    1   2   3   4   5   >