Re: [RFC PATCH RESEND] scripts/checkpatch.pl: Change line limit warning

2022-06-09 Thread Peter Maydell
On Mon, 6 Jun 2022 at 15:34, Lucas Mateus Castro(alqotel) wrote: > > The QEMU documentation mentions that lines should be up to 80 > characters and that the script checkpatch will warn at 100 characters, > but the script warns at 80 characters and throw and error at 90, so > this commit changes to

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

2022-06-09 Thread Alberto Faria
On Wed, Jun 8, 2022 at 1:50 PM Stefan Hajnoczi wrote: > Yes, that's fine. My main concern is that callers have been audited when > errnos are changed. If you switch bdrv_{pread,pwrite}() to -EIO and have > audited callers, then I'm happy. > > Consistent -EINVAL would be nice in the future, but I t

Re: [PATCH v3 0/3] Misc AC97 clean ups

2022-06-09 Thread BALATON Zoltan
On Thu, 9 Jun 2022, Gerd Hoffmann wrote: On Wed, May 18, 2022 at 12:37:18PM +0200, Paolo Bonzini wrote: On 5/17/22 21:47, BALATON Zoltan wrote: On Mon, 9 May 2022, BALATON Zoltan wrote: On Mon, 2 May 2022, BALATON Zoltan wrote: On Sat, 23 Apr 2022, BALATON Zoltan wrote: During trying to impl

Re: [PATCH v2 6/6] bsd-user/freebsd/os-syscall.c: Implement exit

2022-06-09 Thread Richard Henderson
On 6/8/22 14:17, Warner Losh wrote: +static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1) +{ +#ifdef TARGET_GPROF +_mcleanup(); +#endif +gdb_exit(arg1); +qemu_plugin_user_exit(); +/* XXX: should free thread stack and CPU env here */ +_exit(arg1); + I think you c

[PATCH v5 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, b

Re: [PATCH 1/2] target/arm: SCR_EL3 bits 4,5 are always res0

2022-06-09 Thread Peter Maydell
On Sun, 5 Jun 2022 at 17:14, Richard Henderson wrote: > > These bits do not depend on whether or not el1 supports aa32. > > Signed-off-by: Richard Henderson Isn't this effectively reverting commit 10d0ef3e6cfe2, which got applied as a bug fix last year ? In particular, the reason we need to che

[PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-06-09 Thread Emanuele Giuseppe Esposito
virtio_queue_aio_attach_host_notifier() and virtio_queue_aio_attach_host_notifier_nopoll() run always in the main loop, so there is no need to protect them with AioContext lock. On the other side, virtio_queue_aio_detach_host_notifier() runs in a bh in the iothread context, but it is always schedu

Re: [PATCH v2 0/6] bsd-user upstreaming: read, write and exit

2022-06-09 Thread Richard Henderson
On 6/8/22 14:17, Warner Losh wrote: Warner Losh (6): bsd-user/freebsd/os-syscall.c: lock_iovec bsd-user/freebsd/os-syscall.c: unlock_iovec bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv bs

[PATCH 4/8] virtio: categorize callbacks in GS

2022-06-09 Thread Emanuele Giuseppe Esposito
All the callbacks below are always running in the main loop. The callbacks are the following: - start/stop_ioeventfd: these are the callbacks where blk_set_aio_context(iothread) is done, so they are called in the main loop. - save and load: called during migration, when VM is stopped from the

Re: [PATCH 2/2] target/arm: SCR_EL3.RW is RAO/WI without AArch32 EL[12]

2022-06-09 Thread Peter Maydell
On Sun, 5 Jun 2022 at 17:16, Richard Henderson wrote: > > Since DDI0487F.a, the RW bit is RAO/WI. When specifically > targeting such a cpu, e.g. cortex-a76, it is legitimate to > ignore the bit within the secure monitor. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1062 > Signed-of

[PATCH v5 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 Reviewed-by: Stefan Hajnoczi --- block/qcow2.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c in

[PATCH 6/8] virtio-blk: mark IO_CODE functions

2022-06-09 Thread Emanuele Giuseppe Esposito
Just as done in the block API, mark functions in virtio-blk that are called also from iothread(s). We know such functions are IO because many are blk_* callbacks, running always in the device iothread, and remaining are propagated from the leaf IO functions (if a function calls a IO_CODE function,

[PATCH v4 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 rely

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

2022-06-09 Thread Keith Busch
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 admin queue has to be created before db buffer can be set up, so we can't rely

Re: [PATCH v2 36/71] target/arm: Unexport aarch64_add_*_properties

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > These functions are not used outside cpu64.c, > so make them static. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.h | 3 --- > target/arm/cpu64.c | 4 ++-- > 2 files changed, 2 insertions(+), 5 deletions(-) > Reviewed-by

[PATCH v4 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 --- 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 bb454200e5..d4d3bed783 100644 --- a/inclu

Re: [PATCH v2 37/71] target/arm: Add cpu properties for SME

2022-06-09 Thread Peter Maydell
On Tue, 7 Jun 2022 at 21:33, Richard Henderson wrote: > > Mirror the properties for SVE. The main difference is > that any arbitrary set of powers of 2 may be supported, > and not the stricter constraints that apply to SVE. > > Include a property to control FEAT_SME_FA64, as failing > to restrict

Re: [PATCH 10/20] migration: stop passing 'opaque' parameter to QEMUFile hooks

2022-06-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > The only user of the hooks is RDMA which provides a QIOChannel backed > impl of QEMUFile. It can thus use the qemu_file_get_ioc() method. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > migration/qemu-file.c

[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 --- hw/block/datapl

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

2022-06-09 Thread Richard Henderson
https://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

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

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

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

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

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

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

[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 (qemu_dbus_display1_vm_ge

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

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 ad

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

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 {category}

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

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

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(&proxy->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 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 appropri

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

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

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 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 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 +++--- > targ

[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 `asser

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 change

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

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

[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 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 bb454200e5.

[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 +- block/qco

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,

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 +++--- > migration/qemu-f

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

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

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 con

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

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

[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 changed,

[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 deletions(-

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

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

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 thanks

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

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

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

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

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 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 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 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 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 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 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 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: 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 wrote

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 p

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

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. +sta

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

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

[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 --- linux-headers/linux/vduse.

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

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

[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> Signed-off-by:

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

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

[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: rbd:rb

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

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

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

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

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. > > Signed-off

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

<    1   2   3   4   5   >