Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-13 Thread Damien Le Moal
On 3/14/23 11:23, Dmitry Fomichev wrote: >> @@ -3339,10 +3473,27 @@ static int coroutine_fn >> raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op, >> len >> BDRV_SECTOR_BITS); >> ret = raw_thread_pool_submit(bs, handle_aiocb_zone_mgmt, ); >> if (ret != 0) { >>

Re: [PATCH v6 2/4] block: introduce zone append write for zoned devices

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:31 +0800, Sam Li wrote: > A zone append command is a write operation that specifies the first > logical block of a zone as the write position. When writing to a zoned > block device using zone append, the byte offset of writes is pointing > to the write pointer of that

Re: [PATCH v6 4/4] block: add some trace events for zone append

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:31 +0800, Sam Li wrote: > Signed-off-by: Sam Li Looks good, Reviewed-by: Dmitry Fomichev >  block/file-posix.c | 3 +++ >  block/trace-events | 2 ++ >  2 files changed, 5 insertions(+) > > diff --git a/block/file-posix.c b/block/file-posix.c > index

Re: [PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:31 +0800, Sam Li wrote: > Since Linux doesn't have a user API to issue zone append operations to > zoned devices from user space, the file-posix driver is modified to add > zone append emulation using regular writes. To do this, the file-posix > driver tracks the wp

Re: [PATCH v16 7/8] block: add some trace events for new block layer APIs

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:24 +0800, Sam Li wrote: > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi With one small nit below, Reviewed-by: Dmitry Fomichev > --- >  block/file-posix.c | 3 +++ >  block/trace-events | 2 ++ >  2 files changed, 5 insertions(+) > > diff --git

Re: [PATCH v16 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:23 +0800, Sam Li wrote: > Add zoned device option to host_device BlockDriver. It will be presented only > for zoned host block devices. By adding zone management operations to the > host_block_device BlockDriver, users can use the new block layer APIs > including Report

Re: [PATCH v16 1/8] include: add zoned device structs

2023-03-13 Thread Dmitry Fomichev
On Fri, 2023-03-10 at 18:23 +0800, Sam Li wrote: > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Damien Le Moal > Reviewed-by: Hannes Reinecke Looks good to me. Reviewed-by: Dmitry Fomichev > --- >  include/block/block-common.h | 43

Re: [PATCH] include/blcok: fixup typos

2023-03-13 Thread Wilfred Mallawa
On Mon, 2023-03-13 at 10:01 +, Peter Maydell wrote: > On Mon, 13 Mar 2023 at 00:26, Wilfred Mallawa > wrote: > > > > From: Wilfred Mallawa > > > > Fixup a few minor typos > > Typo in patch subject line: should be 'block' :-) Ha! already sent a V2 for this :) > > > Signed-off-by: Wilfred

Re: [PULL v2 00/25] Win socket patches

2023-03-13 Thread Peter Maydell
On Mon, 13 Mar 2023 at 11:46, wrote: > > From: Marc-André Lureau > > The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 > +) > > are

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-13 Thread Kevin Wolf
Am 10.03.2023 um 16:13 hat Paolo Bonzini geschrieben: > On Fri, Mar 10, 2023 at 3:25 PM Kevin Wolf wrote: > > > 1. The TRIM operation should be completed on the IDE level before > > > draining ends. > > > 2. Block layer requests issued after draining has begun are queued. > > > > > > To me, the

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-13 Thread Paolo Bonzini
On 3/13/23 13:29, Fiona Ebner wrote: In fact, shouldn't request queuing was enabled at the _end_ of bdrv_drained_begin (once the BlockBackend has reached a quiescent state on its own terms), rather than at the beginning (which leads to deadlocks like this one)? Couldn't this lead to scenarios

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-13 Thread Fiona Ebner
Am 10.03.23 um 16:13 schrieb Paolo Bonzini: > On Fri, Mar 10, 2023 at 3:25 PM Kevin Wolf wrote: >>> 1. The TRIM operation should be completed on the IDE level before >>> draining ends. >>> 2. Block layer requests issued after draining has begun are queued. >>> >>> To me, the conclusion seems to

Qemu-storage-daemon crash with 8ab8140 or later

2023-03-13 Thread Lukáš Doktor
Hello folks, I found a functional regression in qemu which is making qemu-storage-daemon to crash when using /dev/ram0 as the host device. I bisected it up to: commit 8ab8140a04cf771d63e9754d6ba6c1e676bfe507 Author: Kevin Wolf Date: Fri Feb 3 16:22:02 2023 +0100 block: Mark

[PULL 18/25] tests/docker: fix a win32 error due to portability

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL v2 25/25] monitor: restrict command getfd to POSIX hosts

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Currently, the function will simply fail if ancillary fds are not provided, for ex on unsupported platforms. This changes the failure from: {"error": {"class": "GenericError", "desc": "No file descriptor supplied via SCM_RIGHTS"}} to: {"error": {"class":

[PULL v2 07/25] win32/socket: introduce qemu_socket_unselect() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A more explicit version of qemu_socket_select() with no events. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-8-marcandre.lur...@redhat.com> --- include/sysemu/os-win32.h | 2 ++ io/channel-socket.c | 4 ++--

[PULL 25/25] QMP/HMP: only actually implement getfd on CONFIG_POSIX

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Currently, the function will simply fail if ancillary fds are not provided, for ex on unsupported platforms. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20230306122751.2355515-12-marcandre.lur...@redhat.com> --- qapi/misc.json | 2

[PULL v2 17/25] char: do not double-close fd when failing to add client

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The caller is already closing the fd on failure. Fixes: c3054a6e6a ("char: Factor out qmp_add_client() parts and move to chardev/") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id:

[PULL 17/25] char: do not double-close fd when failing to add client

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The caller is already closing the fd on failure. Fixes: c3054a6e6a ("char: Factor out qmp_add_client() parts and move to chardev/") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id:

[PULL v2 19/25] osdep: implement qemu_socketpair() for win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable

[PULL 24/25] qtest: enable vnc-display test on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth Message-Id: <20230306122751.2355515-11-marcandre.lur...@redhat.com> --- tests/qtest/vnc-display-test.c | 12 +++- 1 file changed,

Re: [PULL 00/25] Win socket patches

2023-03-13 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2023 at 3:44 PM wrote: > > From: Marc-André Lureau > > The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 > +) > >

[PULL v2 20/25] qmp: 'add_client' actually expects sockets

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it to avoid leaks. This allows to replace the close()

[PULL v2 00/25] Win socket patches

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: Merge tag 'linux-user-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 +) are available in the Git repository at:

[PULL v2 08/25] aio: make aio_set_fd_poll() static to aio-posix.c

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-9-marcandre.lur...@redhat.com> --- include/block/aio.h | 8 util/aio-posix.c| 6 +++--- util/aio-win32.c| 7 --- 3 files changed, 3 insertions(+), 18

[PULL 01/25] util: drop qemu_fork()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Fortunately, qemu_fork() is no longer used since commit a95570e3e4d6 ("io/command: use glib GSpawn, instead of open-coding fork/exec"). (GSpawn uses posix_spawn() whenever possible instead) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL v2 12/25] slirp: open-code qemu_socket_(un)select()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-14-marcandre.lur...@redhat.com> --- net/slirp.c | 10

[PULL v2 14/25] os-posix: remove useless ioctlsocket() define

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The API is specific to win32. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230221124802.4103554-16-marcandre.lur...@redhat.com> --- include/sysemu/os-posix.h | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL v2 02/25] tests: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-3-marcandre.lur...@redhat.com> --- tests/unit/socket-helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL v2 18/25] tests/docker: fix a win32 error due to portability

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau docker.py is run during configure, and produces an error: No module named 'pwd'. Use a more portable and recommended alternative to lookup the user "login name". Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL v2 21/25] monitor: release the lock before calling close()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau As per comment, presumably to avoid syscall in critical section. Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230306122751.2355515-7-marcandre.lur...@redhat.com> ---

[PULL v2 06/25] win32/socket: introduce qemu_socket_select() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This is a wrapper for WSAEventSelect, with Error handling. By default, it will produce a warning, so callers don't have to be modified now, and yet we can spot potential mis-use. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id:

[PULL v2 05/25] error: add global _warn destination

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This can help debugging issues or develop, when error handling is introduced. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-6-marcandre.lur...@redhat.com> --- include/qapi/error.h | 6 ++

[PULL 03/25] io: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-4-marcandre.lur...@redhat.com> --- io/channel-socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL 22/25] qmp: add 'get-win32-socket'

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Signed-off-by: Marc-André Lureau Acked-by: Markus Armbruster Message-Id:

[PULL v2 11/25] slirp: unregister the win32 SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now how the slirp library could use the SOCKET later) Signed-off-by: Marc-André Lureau Reviewed-by: Stefan

[PULL v2 22/25] qmp: add 'get-win32-socket'

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Signed-off-by: Marc-André Lureau Acked-by: Markus Armbruster Message-Id:

[PULL v2 09/25] aio/win32: aio_set_fd_handler() only supports SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Let's check if the argument is actually a SOCKET, else report an error and return. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-10-marcandre.lur...@redhat.com> --- util/aio-win32.c | 7 ++- 1 file changed, 6

[PULL v2 01/25] util: drop qemu_fork()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Fortunately, qemu_fork() is no longer used since commit a95570e3e4d6 ("io/command: use glib GSpawn, instead of open-coding fork/exec"). (GSpawn uses posix_spawn() whenever possible instead) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL v2 04/25] tests: add test-error-report

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-5-marcandre.lur...@redhat.com> --- tests/unit/test-error-report.c | 121 + tests/unit/meson.build | 1 + 2 files changed, 122

[PULL 10/25] main-loop: remove qemu_fd_register(), win32/slirp/socket specific

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Open-code the socket registration where it's needed, to avoid artificially used or unclear generic interface. Furthermore, the following patches are going to make socket handling use FD-only inside QEMU, but we need to handle win32 SOCKET from libslirp. Signed-off-by:

[PULL 02/25] tests: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-3-marcandre.lur...@redhat.com> --- tests/unit/socket-helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL v2 24/25] qtest: enable vnc-display test on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Now that qtest_qmp_add_client() works on win32, we can enable the VNC test. Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth Message-Id: <20230306122751.2355515-11-marcandre.lur...@redhat.com> --- tests/qtest/vnc-display-test.c | 12 +++- 1 file changed,

[PULL v2 16/25] tests: fix path separator, use g_build_filename()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230306122751.2355515-2-marcandre.lur...@redhat.com> --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL v2 15/25] win32: replace closesocket() with close() wrapper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use a close() wrapper instead, so that we don't need to worry about closesocket() vs close() anymore, let's hope. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-17-marcandre.lur...@redhat.com> ---

[PULL v2 23/25] libqtest: make qtest_qmp_add_client work on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use the "get-win32-socket" function to pass an opened socket to QEMU, instead of using "getfd", which relies on socket ancillary FD message passing. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL 19/25] osdep: implement qemu_socketpair() for win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Manually implement a socketpair() function, using UNIX sockets and simple peer credential checking. QEMU doesn't make much use of socketpair, beside vhost-user which is not available for win32 at this point. However, I intend to use it for writing some new portable

[PULL v2 13/25] win32: avoid mixing SOCKET and file descriptor space

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Until now, a win32 SOCKET handle is often cast to an int file descriptor, as this is what other OS use for sockets. When necessary, QEMU eventually queries whether it's a socket with the help of fd_is_socket(). However, there is no guarantee of conflict between the fd and

[PULL 20/25] qmp: 'add_client' actually expects sockets

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it to avoid leaks. This allows to replace the close()

[PULL v2 03/25] io: use closesocket()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-4-marcandre.lur...@redhat.com> --- io/channel-socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL v2 10/25] main-loop: remove qemu_fd_register(), win32/slirp/socket specific

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Open-code the socket registration where it's needed, to avoid artificially used or unclear generic interface. Furthermore, the following patches are going to make socket handling use FD-only inside QEMU, but we need to handle win32 SOCKET from libslirp. Signed-off-by:

[PULL 15/25] win32: replace closesocket() with close() wrapper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use a close() wrapper instead, so that we don't need to worry about closesocket() vs close() anymore, let's hope. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-17-marcandre.lur...@redhat.com> ---

[PULL 12/25] slirp: open-code qemu_socket_(un)select()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-14-marcandre.lur...@redhat.com> --- net/slirp.c | 10

[PULL 23/25] libqtest: make qtest_qmp_add_client work on win32

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Use the "get-win32-socket" function to pass an opened socket to QEMU, instead of using "getfd", which relies on socket ancillary FD message passing. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL 14/25] os-posix: remove useless ioctlsocket() define

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The API is specific to win32. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230221124802.4103554-16-marcandre.lur...@redhat.com> --- include/sysemu/os-posix.h | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL 11/25] slirp: unregister the win32 SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now how the slirp library could use the SOCKET later) Signed-off-by: Marc-André Lureau Reviewed-by: Stefan

[PULL 07/25] win32/socket: introduce qemu_socket_unselect() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau A more explicit version of qemu_socket_select() with no events. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-8-marcandre.lur...@redhat.com> --- include/sysemu/os-win32.h | 2 ++ io/channel-socket.c | 4 ++--

[PULL 08/25] aio: make aio_set_fd_poll() static to aio-posix.c

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-9-marcandre.lur...@redhat.com> --- include/block/aio.h | 8 util/aio-posix.c| 6 +++--- util/aio-win32.c| 7 --- 3 files changed, 3 insertions(+), 18

[PULL 16/25] tests: fix path separator, use g_build_filename()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230306122751.2355515-2-marcandre.lur...@redhat.com> --- tests/unit/test-io-channel-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 21/25] monitor: release the lock before calling close()

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau As per comment, presumably to avoid syscall in critical section. Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230306122751.2355515-7-marcandre.lur...@redhat.com> ---

Re: [PULL 00/25] Win socket patches

2023-03-13 Thread Marc-André Lureau
Hi On Mon, Mar 13, 2023 at 3:43 PM wrote: > From: Marc-André Lureau > > The following changes since commit > 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 > +) > >

[PULL 13/25] win32: avoid mixing SOCKET and file descriptor space

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Until now, a win32 SOCKET handle is often cast to an int file descriptor, as this is what other OS use for sockets. When necessary, QEMU eventually queries whether it's a socket with the help of fd_is_socket(). However, there is no guarantee of conflict between the fd and

[PULL 09/25] aio/win32: aio_set_fd_handler() only supports SOCKET

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Let's check if the argument is actually a SOCKET, else report an error and return. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-10-marcandre.lur...@redhat.com> --- util/aio-win32.c | 7 ++- 1 file changed, 6

[PULL 05/25] error: add global _warn destination

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This can help debugging issues or develop, when error handling is introduced. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-6-marcandre.lur...@redhat.com> --- include/qapi/error.h | 6 ++

[PULL 06/25] win32/socket: introduce qemu_socket_select() helper

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau This is a wrapper for WSAEventSelect, with Error handling. By default, it will produce a warning, so callers don't have to be modified now, and yet we can spot potential mis-use. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id:

[PULL 04/25] tests: add test-error-report

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Message-Id: <20230221124802.4103554-5-marcandre.lur...@redhat.com> --- tests/unit/test-error-report.c | 121 + tests/unit/meson.build | 1 + 2 files changed, 122

[PULL 00/25] Win socket patches

2023-03-13 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29c8a9e31a982874ce4e2c15f2bf82d5f8dc3517: Merge tag 'linux-user-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-12 10:57:00 +) are available in the Git repository at:

Re: [PATCH v10 00/12] parallels: Refactor the code of images checks and fix a bug

2023-03-13 Thread Denis V. Lunev
On 3/7/23 13:20, Hanna Czenczek wrote: On 03.02.23 10:18, Alexander Ivanov wrote: Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use

Re: [PATCH] include/blcok: fixup typos

2023-03-13 Thread Peter Maydell
On Mon, 13 Mar 2023 at 00:26, Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > Fixup a few minor typos Typo in patch subject line: should be 'block' :-) > Signed-off-by: Wilfred Mallawa > --- Otherwise Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v7 4/6] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-13 Thread Thomas Huth
On 13/03/2023 09.24, Alexander Bulekov wrote: This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by:

[PATCH v7 2/6] async: Add an optional reentrancy guard to the BH API

2023-03-13 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov ---

[PATCH v7 4/6] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-13 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backend.c

Re: [PATCH v2] include/block: fixup typos

2023-03-13 Thread Philippe Mathieu-Daudé
On 13/3/23 01:37, Wilfred Mallawa wrote: From: Wilfred Mallawa Fixup a few minor typos Signed-off-by: Wilfred Mallawa --- v2: - Fixup typo in commit msg. include/block/aio-wait.h | 2 +- include/block/block_int-common.h | 2 +- 2 files changed, 2 insertions(+), 2