AioContext lock removal: help needed

2022-07-08 Thread Emanuele Giuseppe Esposito
Hello everyone, As you all know, I am trying to find a way to replace the well known AioContext lock with something else that makes sense and provides the same (or even better) guarantees than using this lock. The reason for this change have been explained over and over and I don't really want to

Re: [PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:11 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:20AM -0400, Emanuele Giuseppe Esposito wrote: >> @@ -146,7 +147,6 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) >> >> s->dataplane_starting = false; >> s->dataplane_started = true; >> -aio_co

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

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:23 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:22AM -0400, Emanuele Giuseppe Esposito wrote: >> diff --git a/hw/block/dataplane/virtio-blk.c >> b/hw/block/dataplane/virtio-blk.c >> index f9224f23d2..03e10a36a4 100644 >> --- a/hw/block/dataplane/virtio-blk.c >> +

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

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:39 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:25AM -0400, Emanuele Giuseppe Esposito wrote: >> 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_* callba

Re: [PATCH 7/8] VirtIOBlock: protect rq with its own lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote: >> @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev) >> * stops all Iothreads. >> */ >> blk_drain(s->blk); >> +aio_context_relea

Re: AioContext lock removal: help needed

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 08/07/2022 um 10:42 schrieb Emanuele Giuseppe Esposito: > Hello everyone, > > As you all know, I am trying to find a way to replace the well known > AioContext lock with something else that makes sense and provides the > same (or even better) guarantees than using this lock. > > The reason

Re: [PATCH 7/8] VirtIOBlock: protect rq with its own lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 08/07/2022 um 11:33 schrieb Emanuele Giuseppe Esposito: > > > Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi: >> On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote: >>> @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev) >>> * stops all Iothr

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-08 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Jul 7, 2022 at 4:25 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Not needed outside monitor.c. Remove the needless stub. >> > >> > Signed-off-by: Marc-André Lureau >> > --- >> > includ

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-08 Thread Marc-André Lureau
Hi On Fri, Jul 8, 2022 at 5:56 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, Jul 7, 2022 at 4:25 PM Markus Armbruster > wrote: > > > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > Not needed outside monitor.c. Remove

[PATCH v4 05/12] tests/vm: upgrade Ubuntu 18.04 VM to 20.04

2022-07-08 Thread John Snow
18.04 has fallen out of our support window, so move ubuntu.aarch64 forward to ubuntu 20.04, which is now our oldest supported Ubuntu release. Notes: This checksum changes periodically; use a fixed point image with a known checksum so that the image isn't re-downloaded on every single invocation.

[PATCH v4 07/12] tests/vm: remove duplicate 'centos' VM test

2022-07-08 Thread John Snow
This is listed twice by accident; we require genisoimage to run the test, so remove the unconditional entry. Signed-off-by: John Snow Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/vm/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests

[PATCH v4 10/12] tests/qemu-iotests: hotfix for 307, 223 output

2022-07-08 Thread John Snow
Do not merge; staged in Hanna's branch. Signed-off-by: John Snow --- tests/qemu-iotests/223.out | 4 ++-- tests/qemu-iotests/307.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index 06479415312..26fb347c5da 100

[PATCH v4 12/12] iotests: fix copy-before-write for macOS and FreeBSD

2022-07-08 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Do not merge: this is a copy of Vladimir's fix that will be taken in through the iotests tree. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: John Snow --- tests/qemu-iotests/tests/copy-before-write | 5 + 1 file changed, 5 insertions(+) dif

[PATCH v4 01/12] qga: treat get-guest-fsinfo as "best effort"

2022-07-08 Thread John Snow
In some container environments, there may be references to block devices witnessable from a container through /proc/self/mountinfo that reference devices we simply don't have access to in the container, and cannot provide information about. Instead of failing the entire fsinfo command, return stub

[PATCH v4 03/12] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-07-08 Thread John Snow
The old CentOS image didn't work anymore because it was already EOL at the beginning of 2022. Signed-off-by: John Snow Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/vm/centos | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/centos b/tests/

[PATCH v4 00/12] Improve reliability of VM tests

2022-07-08 Thread John Snow
Note: patches 10-12 are included for testing simplicity, they shouldn't be merged. They will be included in a forthcoming block PR. V4: - Addressed concern by Marc-Andre in patch 01. - Squashed Ubuntu patches (rth) This patch series attempts to improve the reliability of several of the VM test t

[PATCH v4 09/12] tests/vm: Remove docker cross-compile test from CentOS VM

2022-07-08 Thread John Snow
The fedora container has since been split apart, so there's no suitable nearby target that would support "test-mingw" as it requires both x32 and x64 support -- so either fedora-cross-win32 nor fedora-cross-win64 would be truly suitable. Just remove this test as superfluous with our current CI inf

[PATCH v4 02/12] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-07-08 Thread John Snow
If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/vm/centos | 2 +- 1 file changed, 1 insertio

[PATCH v4 08/12] tests/vm: add 1GB extra memory per core

2022-07-08 Thread John Snow
If you try to run a 16 or 32 threaded test, you're going to run out of memory very quickly with qom-test and a few others. Bump the memory limit to try to scale with larger-core machines. Granted, this means that a 16 core processor is going to ask for 16GB, but you *probably* meet that requiremen

[PATCH v4 06/12] tests/vm: remove ubuntu.i386 VM test

2022-07-08 Thread John Snow
Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not support i386 anymore. The debian project does, but they do not provide any cloud images for it, a new expect-style script would have to be written. Since we have i386 cross-compiler tests hosted on GitLab CI, we don't need to sup

[PATCH v4 11/12] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-07-08 Thread John Snow
Do not merge: Staged in Hanna's branch. Signed-off-by: John Snow --- tests/qemu-iotests/108 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108 index 9e923d6a59f..54e935acf28 100755 --- a/tests/qemu-iotests/108 +++ b/tests/qemu-iotests/108 @@

[PATCH v3] hw: m25p80: Add Block Protect and Top Bottom bits for write protect

2022-07-08 Thread Iris Chen
Signed-off-by: Iris Chen --- Cosmetic suggestions addressed. hw/block/m25p80.c | 102 -- 1 file changed, 90 insertions(+), 12 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 50b523e5b1..f3b401cf90 100644 --- a/hw/block/m25p80.c

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-08 Thread Alberto Faria
On Wed, Jul 6, 2022 at 11:15 AM Daniel P. Berrangé wrote: > For clang-tidy, I've been trying it out integrated into emacs > via eglot and clangd. This means I get clang-tidy errors reported > interactively as I write code, so wouldn't need to run a full > tree analysis. Unfortunately, unless I'm m

Re: [PATCH v3] hw: m25p80: Add Block Protect and Top Bottom bits for write protect

2022-07-08 Thread Francisco Iglesias
On [2022 Jul 08] Fri 09:45:52, Iris Chen wrote: > Signed-off-by: Iris Chen Reviewed-by: Francisco Iglesias > --- > Cosmetic suggestions addressed. > > hw/block/m25p80.c | 102 -- > 1 file changed, 90 insertions(+), 12 deletions(-) > > diff --git a

Re: [PATCH v9 05/21] job.c: add job_lock/unlock while keeping job.h intact

2022-07-08 Thread Vladimir Sementsov-Ogievskiy
On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - many static functions that will be always called with job lock held become _locked, and call _locked functions -