Re: [Stable-7.2.12 00/29] Patch Round-up for stable 7.2.12, frozen at 2024-06-07

2024-06-10 Thread Eric Blake
On Mon, Jun 10, 2024 at 03:20:53PM GMT, Michael Tokarev wrote: > 10.06.2024 15:17, Eric Blake wrote: > > > 01* 690ceb71936f Philippe Mathieu-Daudé: > > > gitlab-ci: Remove job building EDK2 firmware binaries > > > 02* 7bc1286b81d4 Palmer Dabbelt: > > >

Re: [PATCH] nbd: Prevent NULL pointer dereference in nbd_blockdev_client_closed()

2024-06-10 Thread Eric Blake
still an active client, and make sure we don't have any other NULL derefs. I'll respond again once I've studied the code a bit more. > > nbd_server->connections--; > > nbd_update_server_watch(nbd_server); > > -- > Best regards, > Alexander Ivanov -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [Stable-7.2.12 00/29] Patch Round-up for stable 7.2.12, frozen at 2024-06-07

2024-06-10 Thread Eric Blake
On Mon, Jun 10, 2024 at 07:17:53AM GMT, Eric Blake wrote: > On Fri, Jun 07, 2024 at 10:12:02PM GMT, Michael Tokarev wrote: > > The following patches are queued for QEMU stable v7.2.12: > > > > https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 > > > > P

Re: [Stable-7.2.12 00/29] Patch Round-up for stable 7.2.12, frozen at 2024-06-07

2024-06-10 Thread Eric Blake
> 03* 04f6fb897a5a Michael Tokarev: >linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY > 04* ae6d91a7e9b7 Zhu Yangyang: >nbd/server: do not poll within a coroutine context > 05* 4fa333e08dd9 Eric Blake: >nbd/server: Mark negotiation functions as coroutine_fn In addition t

[PULL v2 2/2] iotests: test NBD+TLS+iothread

2024-06-03 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake Message-ID: <20240531180639.1392905-6-ebl...@redhat.com> Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++

[PULL v2 0/2] NBD patches for 2024-05-30

2024-06-03 Thread Eric Blake
Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS+iothread io/channel-tls.c | 26 ++-- io/channel-websock.c | 1 + tests/qemu-iotests/tests/nbd-tls-iothread

[PULL v2 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-06-03 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PATCH v3 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-31 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PATCH v3 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-31 Thread Eric Blake
In v3: - 2/2: fix iotest filtering [kwolf] v2 was here: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg03517.html and this time, I'll wait for R-b before sending my v2 pull request: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg06206.html Eric Blake (2): qio: Inherit

[PATCH v3 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++ tests/qemu-iotests/tests/nbd-tls-iothread.out | 54 ++ 2 files changed, 222 insertions(

Re: [PULL 0/2] NBD patches for 2024-05-30

2024-05-31 Thread Eric Blake
On Thu, May 30, 2024 at 07:22:16AM GMT, Eric Blake wrote: > The following changes since commit 3b2fe44bb7f605f179e5e7feb2c13c2eb3abbb80: > > Merge tag 'pull-request-2024-05-29' of https://gitlab.com/thuth/qemu into > staging (2024-05-29 08:38:20 -0700) > > are available in

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
On Fri, May 31, 2024 at 04:36:20PM GMT, Kevin Wolf wrote: > Am 18.05.2024 um 04:50 hat Eric Blake geschrieben: > > Prevent regressions when using NBD with TLS in the presence of > > iothreads, adding coverage the fix to qio channels made in the > > previous patch.

Re: [PATCH v2 1/4] qom: allow to mark objects (including devices) as deprecated.

2024-05-30 Thread Eric Blake
ark/allow marking/ > > Signed-off-by: Gerd Hoffmann > --- > include/qom/object.h | 1 + > qom/qom-qmp-cmds.c| 4 > system/qdev-monitor.c | 5 + > qapi/qom.json | 4 +++- > 4 files changed, 13 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake

[PULL 0/2] NBD patches for 2024-05-30

2024-05-30 Thread Eric Blake
Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS+iothread io/channel-tls.c | 26 ++-- io/channel-websock.c | 1 + tests/qemu-iotests/tests/nbd-tls-iothread

[PULL 2/2] iotests: test NBD+TLS+iothread

2024-05-30 Thread Eric Blake
relicensing from 2-clause BSD to GPLv2. CC: qemu-sta...@nongnu.org CC: "Richard W.M. Jones" Signed-off-by: Eric Blake Message-ID: <20240518025246.791593-6-ebl...@redhat.com> --- tests/qemu-iotests/tests/nbd-tls-iothread | 168 ++ tests/qemu-iotests/tests/nbd-

[PULL 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-30 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Adding a bit of self-review (in case you want to amend this before pushing, instead of waiting for me to get back online), On Fri, May 17, 2024 at 09:50:15PM GMT, Eric Blake wrote: > Prevent regressions when using NBD with TLS in the presence of > iothreads, adding coverage the fix

Re: [PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
On Fri, May 17, 2024 at 09:50:13PM GMT, Eric Blake wrote: > In v2: > - correct list email address > - add iotest > - add R-b > > I'm offline next week, and have been communicating with Stefan who may > want to push this through his block tree instead of waiting for me to >

[PATCH v2 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-17 Thread Eric Blake
that they inherit feature bits. CC: Stefan Hajnoczi CC: Daniel P. Berrangé CC: qemu-sta...@nongnu.org Fixes: https://issues.redhat.com/browse/RHEL-34786 Fixes: 06e0f098 ("io: follow coroutine AioContext in qio_channel_yield()", v8.2.0) Signed-off-by: Eric Blake Reviewed-by: Stefa

[PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Prevent regressions when using NBD with TLS in the presence of iothreads, adding coverage the fix to qio channels made in the previous patch. CC: qemu-sta...@nongnu.org Signed-off-by: Eric Blake --- tests/qemu-iotests/tests/nbd-tls-iothread | 170 ++ tests/qemu-iotests/tests

[PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
In v2: - correct list email address - add iotest - add R-b I'm offline next week, and have been communicating with Stefan who may want to push this through his block tree instead of waiting for me to get back. Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS

Re: [PATCH 01/14] include/hw: add helpers for defining versioned machine types

2024-05-02 Thread Eric Blake
* _MACHINE_VER_PICK(__VA_ARGS__, \ *MACRO_FOR_5_ARGS, \ *MACRO_FOR_4_ARGS, \ *MACRO_FOR_3_ARGS, \ *MACRO_FOR_2_ARGS)(optional prefix args, __VA_ARGS__) */ But once understood, I see it comes in handy in several places below. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

[PULL 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-25 Thread Eric Blake
option negotiation as also being coroutine_fn. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake Message-ID: <20240408160214.1200629-6-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy [eblake: drop one spurious coroutine_fn marking] Signed-off-by: Eric Blake --

[PULL 1/2] nbd/server: do not poll within a coroutine context

2024-04-25 Thread Eric Blake
the callback, whether or not it required a yield or main loop. Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation") Signed-off-by: Zhu Yangyang [eblake: move callbacks to their use point, add assertions] Signed-off-by: Eric Blake Message-ID: <20240408160214.

[PULL 0/2] NBD patches for 2024-04-25

2024-04-25 Thread Eric Blake
Eric Blake (1): nbd/server: Mark negotiation functions as coroutine_fn Zhu Yangyang (1): nbd/server: do not poll within a coroutine context nbd/nbd-internal.h | 10 - nbd/client.c | 28 ++-- nbd/common.c

Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib

2024-04-19 Thread Eric Blake
need to > tweak the parameter of parse_volume_options() (where we use the > result of g_uri_get_path() as input). > > Reviewed-by: Eric Blake > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Thomas Huth > --- > block/gluster.c | 71

Re: [PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-19 Thread Eric Blake
CentOS Stream 8 will be archived >and no further updates will be provided." > > Thus upgrade our CentOS Stream container to major version 9 now. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Thomas Huth -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] tests/unit: Remove debug statements in test-nested-aio-poll.c

2024-04-19 Thread Eric Blake
6164 > < io_poll_ready > 88/100 qemu:unit / test-nested-aio-pollOK > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/unit/test-nested-aio-poll.c | 7 --- > 1 file changed, 7 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v3 01/13] tests: Remove Ubuntu 20.04 container

2024-04-19 Thread Eric Blake
gt; Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Thomas Huth > --- -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

MAINTAINERS tweak [was: [PATCH for-9.1 0/9] Switch to glib URI parsing code]

2024-04-15 Thread Eric Blake
es, where the last email I found from Peter was https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg00574.html, which asked to update MAINTAINERS to his new address, and that has not made it in so far... -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] dma-helpers: Fix iovec alignment

2024-04-12 Thread Eric Blake
e '& (dbs->align - 1)' to avoid a hardware division, to match the original code; bug QEMU_IS_ALIGNED does not require a power of two, so your choice of '% dbs->align' seems reasonable. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 13/13] util/uri: Remove the old URI parsing code

2024-04-12 Thread Eric Blake
-- > include/qemu/uri.h | 99 --- > util/uri.c | 1466 > util/meson.build |2 +- > 3 files changed, 1 insertion(+), 1566 deletions(-) > delete mode 100644 include/qemu/uri.h > delete mode 100644 util/uri.c Nice. Revi

Re: [PATCH v2 12/13] block/ssh: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
equal(qp_name, "host_key_check")) { > +qdict_put_str(options, "host_key_check", qp_value); > +} else { > +warn_report("Unsupported parameter '%s' in URI.", qp_name); Do we want the trailing '.' in warn_report?

Re: [PATCH v2 11/13] block/nfs: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
} > +if (parse_uint_full(qp_value, 0, )) { > +error_setg(errp, "Illegal value for NFS parameter: %s", ...but since we're touching it, I prefer 'Invalid' over 'Illegal' (any error message implying that you broke a law when you passed in bad data is a bit aggressive). Not a show-stopper to leave it alone. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 10/13] block/nbd: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
mp() here to match the RFC; again, worth a separate patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
On Fri, Apr 12, 2024 at 09:40:18AM -0500, Eric Blake wrote: > > @@ -364,57 +363,57 @@ static int > > qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf, > > QAPI_LIST_PREPEND(gconf->server, gsconf); > > > > /* transport */ > > -if (!uri-&

Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib

2024-04-12 Thread Eric Blake
luster")) { > +uri_scheme = g_uri_get_scheme(uri); > +if (!uri_scheme || !strcmp(uri_scheme, "gluster")) { Pre-existing, but per RFC 3986, we should probably be using strcasecmp for scheme comparisons (I'm not sure if g_uri_parse guarantees a lower-case return, even when the user passed in upper case). That can be a separate patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-10 Thread Eric Blake
to those). So on that grounds, it is okay for a function marked coroutine_fn to call another function not marked coroutine_fn - it just makes the auditing harder to ensure that you aren't violating your promise of no non-blocking calls. It's too close to 9.0-rc3 for my comfort to include this patch series. Even though this bug can cause wedged migrations, I'd feel more comfortable with preparing the pull request for this series (including your fix for dropping this one annotation) for 9.1 and for qemu-stable once the release is complete. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-09 Thread Eric Blake
On Tue, Apr 09, 2024 at 09:30:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 08.04.24 19:00, Eric Blake wrote: > > nbd_negotiate() is already marked coroutine_fn. And given the fix in > > the previous patch to have nbd_negotiate_handle_starttls not create > > and

[PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-08 Thread Eric Blake
option negotiation as also being coroutine_fn. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake --- nbd/server.c | 102 +-- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index

[PATCH v5 1/2] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Eric Blake
the callback, whether or not it required a yield or main loop. Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation") Signed-off-by: Zhu Yangyang [eblake: move callbacks to their use point, add assertions] Signed-off-by: Eric Blake --- nbd/nbd-internal.h | 10 -

[PATCH v5 for-9.0? 0/2] Fix NBD TLS poll in coroutine

2024-04-08 Thread Eric Blake
v4 was here: https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg00624.html Since then: add some asserts [Vladimir], add second patch with more coroutine_fn annotations [Vladimir] Eric Blake (1): nbd/server: Mark negotiation functions as coroutine_fn Zhu Yangyang (1): nbd/server: do

Re: [PATCH v4] nbd/server: do not poll within a coroutine context

2024-04-08 Thread Eric Blake
On Mon, Apr 08, 2024 at 11:46:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 05.04.24 20:44, Eric Blake wrote: > > From: Zhu Yangyang > > > > Coroutines are not supposed to block. Instead, they should yield. > > > > The client performs TLS upgrade

[PATCH v4] nbd/server: do not poll within a coroutine context

2024-04-05 Thread Eric Blake
g [eblake: move callbacks to their use point] Signed-off-by: Eric Blake --- v3: https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg00375.html in v4, factor even the struct to the .c files, avoiding a union [Vladimir] nbd/nbd-internal.h | 10 -- nbd/client.c

Re: [PATCH v3] nbd/server: do not poll within a coroutine context

2024-04-05 Thread Eric Blake
On Fri, Apr 05, 2024 at 05:10:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 04.04.24 04:42, Eric Blake wrote: > > From: Zhu Yangyang > > > > Coroutines are not supposed to block. Instead, they should yield. > > > > The client performs TLS upgrade

[PATCH v3] nbd/server: do not poll within a coroutine context

2024-04-03 Thread Eric Blake
g [eblake: move callbacks to their use point] Signed-off-by: Eric Blake --- After looking at this more, I'm less convinced that there is enough common code here to even be worth trying to share in common.c. This takes the essence of the v2 patch, but refactors it a bit. v2: https://lists.gnu.o

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-03 Thread Eric Blake
t for an unconditional one time through the for loop body. What's worse, different compiler versions will change behavior over time. Making the code ugly to pacify a particular compiler, when that compiler might improve in the future, is a form of chasing windmills. > > All in all, I

Re: [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-04-02 Thread Eric Blake
nlock(var), var2 = NULL) > > > probably, it would be simpler for compiler to understand the logic this way. > Could you check? Wouldn't that attach __attribute__((cleanup(xxx))) to var2, at which point we could cause the compiler to call xxx((void*)(true)) if the user does an earl

Re: [PATCH v2 1/1] nbd/server: do not poll within a coroutine context

2024-04-01 Thread Eric Blake
nbd_server_tls_handshake, >, >NULL, >NULL); > > - if (!data.complete) { > -g_main_loop_run(data.loop); > +while (!data.complete) { > +qemu_coroutine_yield(); > } > -g_main_loop_unref(data.loop); > + > if (data.error) { > object_unref(OBJECT(tioc)); > error_propagate(errp, data.error); > -- > 2.33.0 > Thanks for the updated patch - it looks like we are heading in a good direction. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
t;socket". Maybe it is worth an explicit addition to the NBD URI spec to mention that we intend to be case-sensitive (in the parts where it can be; I'm not sure if the schema part must be handled case-insensitively without re-reading the RFCs), and therefore that 'Socket=' does NOT have the same meaning as 'socket='. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
intentional change? No one actually passes an explicit ":0" port on purpose, but we do have to worry about malicious URIs. > g_free(port_str); > } > > out: > if (qp) { > -query_params_free(qp); > +g_hash_table_destroy(qp); > } > -uri_free(uri); > +g_uri_unref(uri); > return ret; It may be possible to eliminate the out label altogether, if GHashTable has the appropriate auto-free magic. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 00/19] -Werror=maybe-uninitialized fixes

2024-03-28 Thread Eric Blake
e-positive > tests: fix -Werror=maybe-uninitialized > hw/nvme: fix -Werror=maybe-uninitialized > hw/virtio: fix -Werror=maybe-uninitialized > RFC: hw/virtio: a potential leak fix > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Eric Blake
/client-connection.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/nbd/client-connection.c b/nbd/client-connection.c > index f9da67c87e..b11e266807 100644 > --- a/nbd/client-connection.c > +++ b/nbd/client-connection.c > @@

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Eric Blake
work has no spaces does not mean that your S-o-b has to follow suit). It is also permissible to list your name in native characters alongside or in place of the Anglicized version; for example, 'git log --author="Stefano Dong"' shows this technique. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-27 Thread Eric Blake
`self != co' failed. so I obviously got something wrong. It may be possible to use block_gen_c to turn nbd_receive_negotiate and nbd_receive_export_list into co_wrapper functions, if I can audit that all of their code goes through qio (and is therefore coroutine-safe), but that work is still ongoing. At a

Re: [PATCH for-9.1 v2 04/11] vhost-user-server: don't abort if we can't set fd non-blocking

2024-03-26 Thread Eric Blake
} This now ignores all errors even on pre-existing fds where we NEED non-blocking, rather than just the specific (expected) error we are seeing on MacOS. Should this code be a bit more precise about checking that -ret == EXXX for the expected errno value we are ignoring for the specific fds

Re: [PATCH for-9.1 v2 03/11] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-03-26 Thread Eric Blake
advertised, instead of panicking? > vmsg_set_reply_u64(vmsg, features); > return true; > } > -- > 2.44.0 > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH for-9.1 v2 02/11] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-03-26 Thread Eric Blake
kay, although I might have used < instead of <=. > +vu_panic(dev, "Error while writing: %s", strerror(errno)); > +return false; > +} At any rate, noticing the error is the correct thing to do. > + > if (vmsg->size) { > do { >

Re: [PATCH for-9.1 v2 01/11] libvhost-user: set msg.msg_control to NULL when it is empty

2024-03-26 Thread Eric Blake
subprojects/libvhost-user/libvhost-user.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff --git a/subprojects/libvhost-user/libvhost-user.c > b/subprojects/libvhost-user/libvhost-user.c > index a879149fef..22bea0c775 100644 > --- a/subproject

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-25 Thread Eric Blake
;b... s/b>->/b->/ > + */ > +if (!co->co_queue_next.sqe_next && > +self->co_queue_wakeup.sqh_last != >co_queue_next.sqe_next) { > +QSIMPLEQ_INSERT_TAIL(>co_queue_wakeup, co, co_queue_next); > + } > } else { &g

Re: [PATCH for-9.0] mirror: Don't call job_pause_point() under graph lock

2024-03-13 Thread Eric Blake
0 ++ > 2 files changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 08/16] block/qcow2: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Eric Blake
gt; their beginning. > > [1]: Issue description in the commit message of commit ae7c80a7bd73 > ("error: New macro ERRP_GUARD()"). > > Cc: Kevin Wolf > Cc: Hanna Reitz > Signed-off-by: Zhao Liu > --- > block/qcow2.c | 2 ++ > 1 file changed, 2 insertions

Re: [PATCH 03/16] block: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Eric Blake
) at their beginning. > > [1]: Issue description in the commit message of commit ae7c80a7bd73 > ("error: New macro ERRP_GUARD()"). > > Cc: Kevin Wolf > Cc: Hanna Reitz > Signed-off-by: Zhao Liu > --- > block.c | 4 > 1 file changed, 4 insertions

Re: [PATCH 2/2] docs/devel/writing-monitor-commands: Minor improvements

2024-02-27 Thread Eric Blake
ropriate "the" here > and there. > > Signed-off-by: Markus Armbruster > --- > docs/devel/writing-monitor-commands.rst | 32 - > 1 file changed, 15 insertions(+), 17 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 1/2] docs/devel/writing-monitor-commands: Repair a decade of rot

2024-02-27 Thread Eric Blake
gt; +struct with a string member. It is intended to be used for all > +commands that are returning unstructured text targeted at > +humans. These should all have feature 'unstable'. Note that the > +feature's documentation states why the command is unstable. WE We > +commonly use a ``x-`` command name prefix to make lack of stability > +obvious to human users. > Cleanups are trivial enough that I'm fine with you making them before including: Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 4/4] qapi/char: Deprecate backend type "memory"

2024-02-07 Thread Eric Blake
. > > Signed-off-by: Markus Armbruster > --- > docs/about/deprecated.rst | 8 > qapi/char.json| 8 +--- > 2 files changed, 13 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 3/4] qapi/char: Make backend types properly conditional

2024-02-07 Thread Eric Blake
a. > > Signed-off-by: Markus Armbruster > --- > qapi/char.json | 20 > 1 file changed, 12 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 2/4] tests/unit/test-char: Fix qemu_socket(), make_udp_socket() check

2024-02-07 Thread Eric Blake
-char.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake Might be worth amending the commit message of 1/4 where you called out this bug to mention it will be fixed in the next patch. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 1/4] chardev/parallel: Don't close stdin on inappropriate device

2024-02-07 Thread Eric Blake
e # if defined(__linux__) ... defined(__APPLE__) # define HAVE_CHARDEV_SERIAL 1 # endif # if defined(__linux__) ... defined(__DragonFly__) # define HAVE_CHARDEV_PARALLEL 1 # endif #endif > +++ b/chardev/meson.build > @@ -21,11 +21,9 @@ if host_os == 'windows' > else > chardev

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

2024-01-29 Thread Eric Blake
ferent. But that's a bigger task for gcc, and not one for this group. > > Signed-off-by: Richard W.M. Jones > --- > block/blkio.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2024-01-29 Thread Eric Blake
ame redundant in commit 901a34a400a (qapi: add 'If:' > section to generated documentation) added the latter. Drop the > former. > > Signed-off-by: Markus Armbruster > --- > qapi/misc-target.json | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Eric Blake -- E

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

2024-01-29 Thread Eric Blake
type" is ""event"" > Additional members depend on the value of "meta-type". > > The last line became redundant when commit 88f63467c57 (qapi2texi: > Generate reference to base type members) added the lines preceding it. > Drop it. > > Blockdev

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

2024-01-29 Thread Eric Blake
I've made up my > mind. > > Signed-off-by: Markus Armbruster > --- > qapi/block-export.json | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] iotests: don't run tests requiring cached writes in '-nocache' mode

2024-01-25 Thread Eric Blake
ort makes sense. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/271 | 1 + > tests/qemu-iotests/308 | 2 ++ > tests/qemu-iotests/common.rc | 7 +++ > tests/qemu-iotests/tests/file-io-error | 1 + > 4 files changed,

Re: [PATCH] iotests/264: Use iotests.sock_dir for socket creation

2024-01-25 Thread Eric Blake
gt; This commit basically aligns iotests/264 with the rest of iotests. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/264 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/tests/qemu-iotests/264 b/tests

Re: [PATCH 0/7] qapi qmp: Documentation fixes

2024-01-25 Thread Eric Blake
code-gen.txt > docs/interop/bitmaps: Clean up a reference to qemu-qmp-ref > qapi: Fix mangled "Returns" sections in documentation > qapi: Indent tagged doc comment sections properly > qapi: Fix malformed "Since:" section tags (again) For the series: Reviewe

Re: [PATCH] iotests/277: Use iotests.sock_dir for socket creation

2024-01-24 Thread Eric Blake
gt; This commit basically aligns iotests/277 with the rest of iotests. > > Signed-off-by: Andrey Drobyshev > --- > tests/qemu-iotests/277 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/tests/qemu-iotests/277 b/tests

Re: Re: [PATCH v2 1/4] Include new arbitrary limits if not already defined

2024-01-24 Thread Eric Blake
defines SIZE_MAX with > > * the wrong type. Our replacement isn't usable in preprocessor > > * expressions, but it is sufficient for our needs. */ > > Ccing some people who know more about portability concerns > than I do... > > thanks > -- PMM > -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 2/2] meson: generate .stp files for tools too

2024-01-09 Thread Eric Blake
ps of traceable binaries, with the obvious difference being the generation of command:[] in a way that uses the correct prefixes per tracable item. And since I hit the problem of not being able to see trace output via qemu-trace-stap on qemu-io, this makes sense. Reviewed-by: Eric Blake -- Eric B

Re: [PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2024-01-02 Thread Eric Blake
make NBDClient->refcount atomic. > > Signed-off-by: Stefan Hajnoczi > --- > nbd/server.c | 23 ++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 12/12] block: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
ssion that could lead to a bug; so I'm okay with your action there. > > Signed-off-by: Stefan Hajnoczi > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 11/12] job: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:52PM -0500, Stefan Hajnoczi wrote: > The AioContext lock no longer exists. > > Signed-off-by: Stefan Hajnoczi > --- > include/qemu/job.h | 20 > 1 file changed, 20 deletions(-) > Reviewed-by: Eric Blake -- Eric Blak

Re: [PATCH 10/12] scsi: remove outdated AioContext lock comment

2023-11-30 Thread Eric Blake
> lock is unnecessary. > > Signed-off-by: Stefan Hajnoczi > --- > hw/scsi/scsi-disk.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 09/12] docs: remove AioContext lock from IOThread docs

2023-11-30 Thread Eric Blake
- > 1 file changed, 15 insertions(+), 30 deletions(-) > > diff --git a/docs/devel/multiple-iothreads.txt > b/docs/devel/multiple-iothreads.txt > index a3e949f6b3..4865196bde 100644 > --- a/docs/devel/multiple-iothreads.txt Reviewed-by: Eric Blake -- Eric Blake,

Re: [PATCH 08/12] aio: remove aio_context_acquire()/aio_context_release() API

2023-11-30 Thread Eric Blake
the compiler to > check whether the graph lock is being used correctly. > > And me, well, I'm just here to add some pizzazz to the QEMU multi-queue > block layer :). Thank you to everyone who helped with this effort, > including Eric Blake, code reviewer extraordinaire, and others who I'v

Re: [PATCH 07/12] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED()

2023-11-30 Thread Eric Blake
> --- > include/block/aio-wait.h | 16 > 1 file changed, 4 insertions(+), 12 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 06/12] scsi: remove AioContext locking

2023-11-30 Thread Eric Blake
hw/scsi/scsi-disk.c | 28 > hw/scsi/virtio-scsi.c | 18 -- > 4 files changed, 4 insertions(+), 58 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 05/12] block: remove AioContext locking

2023-11-30 Thread Eric Blake
nless user opts in via environment variable. > - */ > -if (getenv("QEMU_TEST_FLAKY_TESTS")) { > -g_test_add_func("/blockjob/complete_in_standby", > test_complete_in_standby); > -} Looks like you ripped out this entire test, because it is no longer viable. I might have mentioned it in the commit message, or squashed the removal of this test into the earlier 02/12 patch. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 2/2] block: stream: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
apper. Same long name as in 1/2; if we come up with a nicer name (my proposal in 1/2 was backing-mask-protocol; but I'm open to others), we should keep the two patches consistent. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH v2 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
even when no image header will be updated (default false; since 9.0). or s/mask/hide/ if that sounds better. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 04/12] graph-lock: remove AioContext locking

2023-11-30 Thread Eric Blake
lock_ctx() becomes meaningless and they can be collapsed > into one function. > > Signed-off-by: Stefan Hajnoczi > --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 03/12] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-11-30 Thread Eric Blake
qemu_rec_mutex_unlock(>lock); > +/* TODO remove this function */ > } > > QEMU_DEFINE_STATIC_CO_TLS(AioContext *, my_aiocontext) > -- > 2.42.0 Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 02/12] tests: remove aio_context_acquire() tests

2023-11-30 Thread Eric Blake
t; 1 file changed, 1 insertion(+), 66 deletions(-) The rest of this series should not hold up 8.2. Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-11-30 Thread Eric Blake
/virtio-scsi.h | 3 +- > hw/scsi/virtio-scsi.c | 62 ++--- > 2 files changed, 43 insertions(+), 22 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 4/4] dma-helpers: don't lock AioContext in dma_blk_cb()

2023-11-27 Thread Eric Blake
rs.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 3/4] scsi: don't lock AioContext in I/O code path

2023-11-27 Thread Eric Blake
-- > hw/scsi/scsi-generic.c | 20 +++- > 2 files changed, 3 insertions(+), 40 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-11-27 Thread Eric Blake
text lock > before. > > Signed-off-by: Stefan Hajnoczi > --- > hw/scsi/virtio-scsi-dataplane.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH] vmdk: Don't corrupt desc file in vmdk_write_cid

2023-11-27 Thread Eric Blake
26 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake Are we trying to get this into 8.2, since it is a data corruption? -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

Re: [PATCH 1/4] scsi: only access SCSIDevice->requests from one thread

2023-11-27 Thread Eric Blake
s are executed from a single AioContext. Leave > that as future work. > > Signed-off-by: Stefan Hajnoczi > --- > include/hw/scsi/scsi.h | 7 +- > hw/scsi/scsi-bus.c | 174 - > 2 files changed, 124 insertions(+), 57 deletions(-) >

Re: [PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-21 Thread Eric Blake
amp; cond2)' for purposes of eliding the code for cond2, that seems like a blatant missed optimization that we should be reporting to the clang folks. While this patch may solve the immediate issue, it does not scale - if we ever have two separate guards that can both be independently hard-coded to 0 based on configure-time decisions, but which are both used as guards in the same expression, it will become impossible to avoid a '(cond1 && 0 && cond2)' scenario across all 4 possible configurations of those two guards. I have no objection to the patch, but it would be nice if the commit message could point to a clang bug report, if one has been filed. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

  1   2   3   4   5   6   7   8   9   10   >