Re: [PATCH 0/3] monitor: only run coroutine commands in qemu_aio_context

2024-01-29 Thread Peter Maydell
On Tue, 16 Jan 2024 at 19:01, Stefan Hajnoczi wrote: > > Several bugs have been reported related to how QMP commands are rescheduled in > qemu_aio_context: > - https://gitlab.com/qemu-project/qemu/-/issues/1933 > - https://issues.redhat.com/browse/RHEL-17369 > - https://bugzilla.redhat.com/show_bu

[PATCH 2/5] qapi: Drop redundant documentation of conditional

2024-01-29 Thread Markus Armbruster
Documentation generated for dump-skeys contains This command is only supported on s390 architecture. and If ~~ "TARGET_S390X" The former became redundant in commit 901a34a400a (qapi: add 'If:' section to generated documentation) added the latter. Drop the former. Signed-off-b

[PATCH 4/5] qga: Move type description right after type name

2024-01-29 Thread Markus Armbruster
Documentation of type BlockdevOptionsIscsi describes the type's purpose after its members. Everywhere else, we do it the other way round. Move it for consistency. Signed-off-by: Markus Armbruster --- qapi/block-core.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/q

[PATCH 3/5] qapi: Elide "Potential additional modes" from generated docs

2024-01-29 Thread Markus Armbruster
Documentation of BlockExportRemoveMode has Potential additional modes to be added in the future: hide: Just hide export from new clients, leave existing connections as is. Remove export after all clients are disconnected. soft: Hide export from new clients, answer with ESHUTDOWN

[PATCH 5/5] qga/qapi-schema: Move command description right after command name

2024-01-29 Thread Markus Armbruster
Documentation of commands guest-ssh-get-authorized-keys, guest-ssh-add-authorized-keys, and guest-ssh-remove-authorized-keys describes the command's purpose after its arguments. Everywhere else, we do it the other way round. Move it for consistency. Signed-off-by: Markus Armbruster --- qga/qap

[PATCH 1/5] qapi: Drop redundant documentation of inherited members

2024-01-29 Thread Markus Armbruster
Documentation generated for SchemaInfo looks like The members of "SchemaInfoBuiltin" when "meta-type" is ""builtin"" The members of "SchemaInfoEnum" when "meta-type" is ""enum"" The members of "SchemaInfoArray" when "meta-type" is ""array"" The members of "SchemaInfoObject" when "m

[PATCH 0/5] qmp: Documentation cleanups

2024-01-29 Thread Markus Armbruster
Markus Armbruster (5): qapi: Drop redundant documentation of inherited members qapi: Drop redundant documentation of conditional qapi: Elide "Potential additional modes" from generated docs qga: Move type description right after type name qga/qapi-schema: Move command description right af

Re: NVME hotplug support ?

2024-01-29 Thread Damien Hedde
On 1/24/24 08:47, Hannes Reinecke wrote: On 1/24/24 07:52, Philippe Mathieu-Daudé wrote: Hi Hannes, [+Markus as QOM/QDev rubber duck] On 23/1/24 13:40, Hannes Reinecke wrote: On 1/23/24 11:59, Damien Hedde wrote: Hi all, We are currently looking into hotplugging nvme devices and it is c

Re: [PATCH] iotests/iothreads-stream: Use the right TimeoutError

2024-01-29 Thread Stefan Hajnoczi
On Thu, Jan 25, 2024 at 04:21:50PM +0100, Kevin Wolf wrote: > Since Python 3.11 asyncio.TimeoutError is an alias for TimeoutError, but > in older versions it's not. We really have to catch asyncio.TimeoutError > here, otherwise a slow test run will fail (as has happened multiple > times on CI recen

Re: [PATCH 2/2] virtio: Keep notifications disabled during drain

2024-01-29 Thread Stefan Hajnoczi
On Thu, Jan 25, 2024 at 07:32:12PM +0100, Hanna Czenczek wrote: > On 25.01.24 19:18, Hanna Czenczek wrote: > > On 25.01.24 19:03, Stefan Hajnoczi wrote: > > > On Wed, Jan 24, 2024 at 06:38:30PM +0100, Hanna Czenczek wrote: > > [...] > > > > > @@ -3563,6 +3574,13 @@ void > > > > virtio_queue_aio_a

Re: NVME hotplug support ?

2024-01-29 Thread Klaus Jensen
On Jan 29 14:13, Damien Hedde wrote: > > > On 1/24/24 08:47, Hannes Reinecke wrote: > > On 1/24/24 07:52, Philippe Mathieu-Daudé wrote: > > > Hi Hannes, > > > > > > [+Markus as QOM/QDev rubber duck] > > > > > > On 23/1/24 13:40, Hannes Reinecke wrote: > > > > On 1/23/24 11:59, Damien Hedde wrot

Re: NVME hotplug support ?

2024-01-29 Thread Hannes Reinecke
On 1/29/24 14:13, Damien Hedde wrote: On 1/24/24 08:47, Hannes Reinecke wrote: On 1/24/24 07:52, Philippe Mathieu-Daudé wrote: Hi Hannes, [+Markus as QOM/QDev rubber duck] On 23/1/24 13:40, Hannes Reinecke wrote: On 1/23/24 11:59, Damien Hedde wrote: Hi all, We are currently looking into

[PATCH v3 0/6] hw/{arm,xen} convert printfs to trace/reports

2024-01-29 Thread Manos Pitsidianakis
This series changes some printfs to use the trace event framework. Additionally, it converts some error/warning reporting fprintfs to error_report/warn_report. v2 -> v3 : - addressed Peter Maydells's review v1 -> v2 : - addressed Alex's review Manos Pitsidianakis (6): hw/arm/stronga

[PATCH v3 1/6] hw/arm/strongarm.c: convert DPRINTF to trace events and guest errors

2024-01-29 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into trace events. DPRINTFs t

[PATCH v3 5/6] hw/xen/xen-hvm-common.c: convert DPRINTF to tracepoints

2024-01-29 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH v3 3/6] hw/arm/xen_arm.c: convert DPRINTF to trace events and error/warn reports

2024-01-29 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into trace events. Errors or

[PATCH v3 4/6] hw/xen/xen-mapcache.c: convert DPRINTF to tracepoints

2024-01-29 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on tracepoints should be able to opt-in to each tracepoint and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into tracepoints. Signed-off-b

[PATCH v3 6/6] hw/xen: convert stderr prints to error/warn reports

2024-01-29 Thread Manos Pitsidianakis
According to the QEMU Coding Style document: > Do not use printf(), fprintf() or monitor_printf(). Instead, use > error_report() or error_vreport() from error-report.h. This ensures the > error is reported in the right place (current monitor or stderr), and in > a uniform format. > Use error_print

[PATCH v3 2/6] hw/arm/z2: convert DPRINTF to trace events and guest errors

2024-01-29 Thread Manos Pitsidianakis
Tracing DPRINTFs to stderr might not be desired. A developer that relies on trace events should be able to opt-in to each trace event and rely on QEMU's log redirection, instead of stderr by default. This commit converts DPRINTFs in this file that are used for tracing into trace events. DPRINTFs t

Re: [PATCH 5/5] qga/qapi-schema: Move command description right after command name

2024-01-29 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Jan 29, 2024 at 1:50 PM Markus Armbruster wrote: > Documentation of commands guest-ssh-get-authorized-keys, > guest-ssh-add-authorized-keys, and guest-ssh-remove-authorized-keys > describes the command's purpose after its arguments. Everywhere else, > we

Re: [PATCH 4/5] qga: Move type description right after type name

2024-01-29 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Mon, Jan 29, 2024 at 1:50 PM Markus Armbruster wrote: > Documentation of type BlockdevOptionsIscsi describes the type's > purpose after its members. Everywhere else, we do it the other way > round. Move it for consistency. > > Signed-off-by: Markus Armbruste

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-29 Thread Hanna Czenczek
On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the

[PATCH] hw/hyperv: Include missing headers

2024-01-29 Thread Philippe Mathieu-Daudé
Include missing headers in order to avoid when refactoring unrelated headers: hw/hyperv/hyperv.c:33:18: error: field ‘msg_page_mr’ has incomplete type 33 | MemoryRegion msg_page_mr; | ^~~ hw/hyperv/hyperv.c: In function ‘synic_update’: hw/hyperv/hyperv

[PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Richard W.M. Jones
With GCC 14 the code failed to compile on i686 (and was wrong for any version of GCC): ../block/blkio.c: In function ‘blkio_file_open’: ../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from incompatible pointer type [-Wincompatible-pointer-types] 857 |

[PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Richard W.M. Jones
Repost of the same patch as a minute ago because I messed up a couple of email addresses in the CC. Rich.

Re: [PATCH 3/5] qapi: Elide "Potential additional modes" from generated docs

2024-01-29 Thread Eric Blake
On Mon, Jan 29, 2024 at 12:50:06PM +0100, Markus Armbruster wrote: > Documentation of BlockExportRemoveMode has > > Potential additional modes to be added in the future: > > hide: Just hide export from new clients, leave existing connections > as is. Remove export after all clients a

Re: [PATCH 1/5] qapi: Drop redundant documentation of inherited members

2024-01-29 Thread Eric Blake
On Mon, Jan 29, 2024 at 12:50:04PM +0100, Markus Armbruster wrote: > Documentation generated for SchemaInfo looks like > > The members of "SchemaInfoBuiltin" when "meta-type" is ""builtin"" > The members of "SchemaInfoEnum" when "meta-type" is ""enum"" > The members of "SchemaInfoArray

Re: [PATCH 2/5] qapi: Drop redundant documentation of conditional

2024-01-29 Thread Eric Blake
On Mon, Jan 29, 2024 at 12:50:05PM +0100, Markus Armbruster wrote: > Documentation generated for dump-skeys contains > > This command is only supported on s390 architecture. > > and > > If > ~~ > > "TARGET_S390X" > > The former became redundant in commit 901a34a400a (qapi: add

Re: [PATCH v3 1/6] hw/arm/strongarm.c: convert DPRINTF to trace events and guest errors

2024-01-29 Thread Alex Bennée
Manos Pitsidianakis writes: > Tracing DPRINTFs to stderr might not be desired. A developer that relies > on trace events should be able to opt-in to each trace event and rely on > QEMU's log redirection, instead of stderr by default. > > This commit converts DPRINTFs in this file that are used fo

Re: [PATCH [repost]] block/blkio: Don't assume size_t is 64 bit

2024-01-29 Thread Eric Blake
On Mon, Jan 29, 2024 at 06:53:55PM +, Richard W.M. Jones wrote: > With GCC 14 the code failed to compile on i686 (and was wrong for any > version of GCC): > > ../block/blkio.c: In function ‘blkio_file_open’: > ../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from > inc

Re: [PATCH v2 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-29 Thread Stefan Hajnoczi
On Tue, Jan 23, 2024 at 05:35:31PM +0200, Manos Pitsidianakis wrote: > if (blk_len != size) { > -error_setg(errp, "device requires %" HWADDR_PRIu " bytes, " > - "block backend provides %" PRIu64 " bytes", > - size, blk_len); > +dev_id = qdev_

Re: [PATCH v2 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-29 Thread Stefan Hajnoczi
On Tue, Jan 23, 2024 at 05:35:30PM +0200, Manos Pitsidianakis wrote: > Add a simple method to return some kind of human readable identifier for > use in error messages. > > Signed-off-by: Manos Pitsidianakis > --- > hw/core/qdev.c | 8 > include/hw/qdev-core.h | 14

[PATCH] pflash: fix sectors vs bytes confusion in blk_pread_nonzeroes()

2024-01-29 Thread Stefan Hajnoczi
The following expression is incorrect because blk_pread_nonzeroes() deals in units of bytes, not sectors: bytes = MIN(size - offset, BDRV_REQUEST_MAX_SECTORS) ^^^ BDRV_REQUEST_MAX_BYTES is the appropriate constant. Fixes: a4b15a8b9ef2 ("pflash:

Disk migration from qcow2 to SPDK

2024-01-29 Thread 陈孚
Hello everyone, Recently, we are looking to switch the VM’s disks from the qemu driver with the qcow2 format to a vhost-user-blk driver based on SPDK. Currently, we are able to copy data into an SPDK-based target using the blockcopy method. We would like to inquire if there is a theoretical pos

Re: [PATCH] hw/hyperv: Include missing headers

2024-01-29 Thread Thomas Huth
On 29/01/2024 18.00, Philippe Mathieu-Daudé wrote: Include missing headers in order to avoid when refactoring unrelated headers: hw/hyperv/hyperv.c:33:18: error: field ‘msg_page_mr’ has incomplete type 33 | MemoryRegion msg_page_mr; | ^~~ hw/hyperv

[PATCH v3 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error

2024-01-29 Thread Manos Pitsidianakis
In cases where a device tries to read more bytes than the block device contains, the error is vague: "device requires X bytes, block backend provides Y bytes". This patch changes the errors of this function to include the block backend name, the device id and device type name where appropriate. R

[PATCH v3 1/2] hw/core/qdev.c: add qdev_get_human_name()

2024-01-29 Thread Manos Pitsidianakis
Add a simple method to return some kind of human readable identifier for use in error messages. Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis --- include/hw/qdev-core.h | 14 ++ hw/core/qdev.c | 8 2 files changed, 22 insertions(+) diff --git a/i

[PATCH v3 0/2] hw/block/block.c: improve confusing error

2024-01-29 Thread Manos Pitsidianakis
In cases where a device tries to read more bytes than the block device contains with the blk_check_size_and_read_all() function, the error is vague: "device requires X bytes, block backend provides Y bytes". This patch changes the errors of this function to include the block backend name, the devi