[Qemu-devel] [PATCH 04/12] monitor: remove usage of generated marshal functions

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Once the middle mode is removed, the generated marshal functions will no longer be exported. Signed-off-by: Marc-André Lureau --- monitor.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index fc691b9..585bc1f 100644

[Qemu-devel] [PATCH 12/12] Drop qmp-commands.hx

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Only the documentation remains useful, so strip it. (a later update will move the documentation in the respective json files and generate the text file) Signed-off-by: Marc-André Lureau --- .gitignore |1 - MAINTAINERS

[Qemu-devel] [PATCH 10/12] monitor: use qmp_dispatch()

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Replace the old manual dispatch and validation code by the generic one provided by qapi common code. Signed-off-by: Marc-André Lureau --- monitor.c| 319 +++ trace-events | 1 - 2 files changed, 34 insertions

[Qemu-devel] [PATCH 07/12] monitor: implement 'qmp_query_commands' without qmp_cmds

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau So we can get rid of the static qmp_cmds table. Signed-off-by: Marc-André Lureau --- monitor.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/monitor.c b/monitor.c index 71512e4..77dc439 100644 --- a/monitor.c +++

[Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau This is no longer necessary, now that middle mode has been removed. Signed-off-by: Marc-André Lureau --- docs/writing-qmp-commands.txt | 8 +- hmp-commands-info.hx | 118 hmp-commands.hx | 206 +--

[Qemu-devel] [PATCH 08/12] build-sys: remove qmp-commands-old.h

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- Makefile.target | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile.target b/Makefile.target index d720b3e..8c13294 100644 --- a/Makefile.target +++ b/Makefile.target @@ -159,7 +159,7 @@ else obj-y +=

[Qemu-devel] [PATCH 11/12] qmp: update qmp_query_spice fallback

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau There are a few commands that are undef #ifdef conditions in qmp-commands.hx. Move all the qmp_query_spice fallback in the same location, return an error and update the comment. Signed-off-by: Marc-André Lureau --- monitor.c | 14 ++ qmp.c | 16 -

[Qemu-devel] [PATCH 00/10] RFCv3: vhost-user: simple reconnection support

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau Hi, In a previous series "RFCv2: vhost-user: shutdown and reconnection", I proposed to add a new slave request to handle graceful shutdown, for both qemu configuration, server or client, while keeping the guest running with link down status. However, for the simple case

[Qemu-devel] [PATCH 03/10] vubr: workaround stale vring base

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau This patch is a similar solution to what Yuanhan Liu/Huawei Xie have suggested for DPDK. When vubr quits (killed or crashed), a restart of vubr would get stale vring base from QEMU. That would break the kernel virtio net completely, making it non-work any more, unless a dr

[Qemu-devel] [PATCH 09/10] tests: append i386 tests

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau Do not overwrite x86-64 tests, re-enable vhost-user-test. Signed-off-by: Marc-André Lureau --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 9194f18..50a99f8 100644 --- a/tests/Makefile +++ b/tes

[Qemu-devel] [PATCH 02/10] vubr: add client mode

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau If -c is specified, vubr will try to connect to the socket instead of listening for connections. Signed-off-by: Marc-André Lureau --- tests/vhost-user-bridge.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/t

[Qemu-devel] [PATCH 04/10] qemu-char: add qemu_chr_disconnect to close a fd accepted by listen fd

2016-05-10 Thread marcandre . lureau
From: Tetsuya Mukawa The patch introduces qemu_chr_disconnect(). The function is used for closing a fd accepted by listen fd. Though we already have qemu_chr_delete(), but it closes not only accepted fd but also listen fd. This new function is used when we still want to keep listen fd. Signed-of

[Qemu-devel] [PATCH 08/10] vhost-net: save & restore vring enable state

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau A driver may change the vring enable state at run time but vhost-user backend may not be present (a contrived example is when the backend is disconnected and the device is reconfigured after driver rebinding) Restore the vring state when the vhost-user backend is started,

[Qemu-devel] [PATCH 05/10] vhost-user: disconnect on start failure

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau If the backend failed to start (for example feature negociation failed), do not exit, but disconnect the char device instead. Slightly more robust for reconnect case. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

[Qemu-devel] [PATCH 10/10] test: start vhost-user reconnect test

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau This is a simple reconnect test, that simply checks if vhost-user reconnection is possible and restore the state. A more complete test would actually manipulate and check the ring contents (such extended testing would benefit from the libvhost-user proposed in QEMU list to

[Qemu-devel] [PATCH 06/10] vhost-net: do not crash if backend is not present

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau Do not crash when backend is not present while enabling the ring. A following patch will save the enabled state so it can be restored once the backend is started. Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 7 ++- 1 file changed, 6 insertions(+), 1 del

[Qemu-devel] [PATCH 07/10] vhost-net: save & restore vhost-user acked features

2016-05-10 Thread marcandre . lureau
From: Marc-André Lureau The initial vhost-user connection sets the features to be negotiated with the driver. Renegotiation isn't possible without device reset. To handle reconnection of vhost-user backend, ensure the same set of features are provided, and reuse already acked features. Signed-o

[Qemu-devel] [PATCH 01/10] vhost-user: add ability to know vhost-user backend disconnection

2016-05-10 Thread marcandre . lureau
From: Tetsuya Mukawa Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tets

[Qemu-devel] [PATCH] build-sys: delete TAGS in distclean only

2016-05-17 Thread marcandre . lureau
From: Marc-André Lureau automake and other GNU build-sys generally keep TAGS file in make 'clean' rule and delete it only in 'distclean' (and 'mrproper' for linux). Do the same for qemu. Signed-off-by: Marc-André Lureau --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[Qemu-devel] [PATCH] virtio-gpu: check early scanout id

2016-05-18 Thread marcandre . lureau
From: Marc-André Lureau Before accessing the g->scanout array, in order to avoid potential out-of-bounds access. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/di

[Qemu-devel] [PATCH 6/6] virtio-gpu: fix ui idx check

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Fix off-by-one value check (0 is the first scanout). Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 5811a2d..d1f25d5 100644 --- a/hw

[Qemu-devel] [PATCH 4/6] virtio-gpu: check max_outputs only

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The scanout id should not be above the configured num_scanouts. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-3d.c | 4 ++-- hw/display/virtio-gpu.c| 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw

[Qemu-devel] [PATCH 2/6] virtio-vga: propagate on gpu realized error

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-3d.c | 1 + hw/display/virtio-vga.c| 8 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index fa19294..20e8865 100644 --- a/hw/di

[Qemu-devel] [PATCH 0/6] virtio-gpu: scanout limit fixes

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a small series improving a bit the scanout limit handling. The first patch was sent previously but is also included in this series for convenience. Marc-André Lureau (6): virtio-gpu: check early scanout id virtio-vga: propagate on gpu realized error vir

[Qemu-devel] [PATCH 3/6] virtio-gpu: check max_outputs value

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The value must be less than VIRTIO_GPU_MAX_SCANOUT. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 1193838..77e542f 100644 --- a/hw/display/vi

[Qemu-devel] [PATCH 1/6] virtio-gpu: check early scanout id

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Before accessing the g->scanout array, in order to avoid potential out-of-bounds access. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/di

[Qemu-devel] [PATCH 5/6] virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c| 4 ++-- include/hw/virtio/virtio-gpu.h | 6 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/display/virti

[Qemu-devel] [PATCH] tests: start a /qga/guest-exec test

2016-05-24 Thread marcandre . lureau
From: Marc-André Lureau Test a few guest-exec guest agent commands, added in qemu 2.5. Signed-off-by: Marc-André Lureau --- tests/test-qga.c | 70 1 file changed, 70 insertions(+) diff --git a/tests/test-qga.c b/tests/test-qga.c index 7

[PATCH] ccid-card-emulated: fix cast warning

2022-11-14 Thread marcandre . lureau
From: Marc-André Lureau ../hw/usb/ccid-card-emulated.c: In function 'handle_apdu_thread': ../hw/usb/ccid-card-emulated.c:251:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 251 | assert((unsigned long)event > 1000); Signed-off-by: Marc-A

[PULL 0/1] chardev patch for 7.2

2022-11-20 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit a082fab9d259473a9d5d53307cf83b1223301181: Merge tag 'pull-ppc-20221117' of https://gitlab.com/danielhb/qemu into staging (2022-11-17 12:39:38 -0500) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.

[PULL 1/1] chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor

2022-11-20 Thread marcandre . lureau
From: Bin Meng At present when pressing Ctrl+C from a guest running on QEMU Windows with a multiplexed monitor, e.g.: -serial mon:stdio, QEMU executable just exits. This behavior is inconsistent with the Linux version. Such behavior is caused by unconditionally setting the input mode ENABLE_PROC

[PATCH] vhost-vdpa: skip TPM CRB memory section

2022-11-22 Thread marcandre . lureau
From: Marc-André Lureau 851d6d1a0f ("vfio/common: remove spurious tpm-crb-cmd misalignment warning") removed the warning on vfio_listener_region_add() path. An error is reported for vhost-vdpa case: qemu-kvm: vhost_vdpa_listener_region_add received unaligned region Skip the CRB device. Fixes:

[PATCH] ui/console: fix qemu_console_resize() regression

2022-07-25 Thread marcandre . lureau
From: Marc-André Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Do not short-cut qemu_console_resize() if the surface is backed by vga vram. When the scanout isn't set, or it is already allocated, or opengl, and the size is fitting, we s

[PATCH] RFC: char: deprecate usage of bidirectional pipe

2022-07-26 Thread marcandre . lureau
From: Marc-André Lureau As Ed Swierk explained back in 2006: https://lists.nongnu.org/archive/html/qemu-devel/2006-12/msg00160.html "When qemu writes into the pipe, it immediately reads back what it just wrote and treats it as a monitor command, endlessly breathing its own exhaust." This is sim

[PATCH] ui: -display dbus requires gbm

2022-07-26 Thread marcandre . lureau
From: Marc-André Lureau For now, -display dbus also requires GBM, for EGL setup. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1108 Signed-off-by: Marc-André Lureau --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 8a8c415fc1f8..b2c18

[PATCH 2/2] char: open unidirectional in/out pipes with one-way mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau This is how those paths are meant to be used. Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index f9897a3786..3759558d81 100644 --- a/chardev/cha

[PATCH 1/2] char: open pipe in write-only mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau When not using the "path.in", "path.out", open "path" in read-only mode, as eating our own output is usually not what we want. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2106975 Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 6 -- qemu-opt

[PATCH] tests/unit: fix a -Wformat-trunction warning

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau ../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Wformat-truncation=] 454 | snprintf

[PATCH v3 02/16] error-report: introduce "detailed" variable

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Let's use a more explicit variable "detailed" instead of calling monitor_cur() multiple times. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/error-re

[PATCH v3 00/16] Preliminary patches for subproject split

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is another subset of the large "subproject(qga)" series I intend to send soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). Thanks v3: - use overriable qmp_dispatch_exec() stub, instead of extra callback - qapi-gen "-i file.h" will always gene

[PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- stubs/error-printf.c | 5 - 1 file changed, 5 deletions(-) diff --git a/stubs/error-printf.c b/stubs/error-printf.c index 0e326d8010..1afa0f62ca 100644 --- a/stubs/error-printf.c +++ b/stubs/error-

[PATCH v3 01/16] error-report: misc comment fix

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Missed in commit beeb175c0d "util/qemu-error: Rename error_print_loc() to be more generic". Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/error-report.c b

[PATCH v3 04/16] error-report: introduce overridable error_is_detailed()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Remove the direct dependency from error-report to monitor code. This will allow to move error-report to a subproject. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Reviewed-by: Warner Losh --- include/qemu/error-report.h | 2 ++ softmmu/vl.c

[PATCH v3 08/16] scripts/qapi-gen: add -i option

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to specify the headers to include. This will allow to substitute QEMU osdep.h with glib.h for example, for projects with different global headers. For historical reasons, we can keep the default as "qemu/osd

[PATCH v3 06/16] qapi: move QEMU-specific dispatch code in monitor

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Make QMP-dispatch code free from QEMU-specific OOB dispatch/async coroutine handling. This will allow to move the base code to qemu-common, and clear other users from potential mis-ususe (QGA doesn't have OOB or coroutines). Introduce an overridable qmp_dispatch_exec() fu

[PATCH v3 10/16] util: move 256-by-128 division helpers to int128

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Break a cyclic dependency between int128 and host-utils. Signed-off-by: Marc-André Lureau Reviewed-by: Lucas Mateus Castro --- include/qemu/host-utils.h | 3 - include/qemu/int128.h | 3 + util/host-utils.c | 180 --

[PATCH v3 03/16] error-report: simplify print_loc()

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Pass the program name as "prefix" argument to print_loc() if printing with "details". This allows to get rid of monitor_cur() call in print_loc(). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 8 1 file changed, 4 in

[PATCH v3 07/16] qapi: remove QEMU-specific monitor dependency from dispatch

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau The monitor is specific to QEMU. Instead of passing a Monitor type argument to the exec handler, use a generic void* pointer. This simplify also the unit dependency, as now the dispatching code is free from QEMU-specifics. Signed-off-by: Marc-André Lureau --- include/qa

[PATCH v3 12/16] qemu-common: move scripts/qapi

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau This is just moving qapi-gen.py and related subdir to qemu-common, to ease review and proceed step by step. The following patches will move related necessary code, tests etc. Signed-off-by: Marc-André Lureau --- docs/conf.py | 2 +- mes

[PATCH v3 09/16] scripts/qapi: add required system includes to visitor

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau The generated visitor code includes abort() & assert(), we shouldn't rely on the global "-i" headers to include the necessary system headers. Signed-off-by: Marc-André Lureau Reviewed-by: Warner Losh --- scripts/qapi/visit.py | 2 ++ 1 file changed, 2 insertions(+) di

[PATCH v3 14/16] qemu-common: move error-report

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../qemu-common/include}/qemu/error-report.h | 2 ++ .../qemu-common/src}/error-is-detailed.c | 1 - .../qemu-common/src}/error-report.c | 4 +++- .../qemu-common/src/error-vprintf.c | 5 ++--- stubs/meso

[PATCH v3 11/16] qemu-common: introduce a common subproject

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Add a new meson subproject to provide common code and scripts for QEMU and tools. Initially, it will offer QAPI/QMP code generation and common utilities. libvhost-user & libvduse will make use of the subproject to avoid having include/ links to common headers. The other

[PATCH v3 16/16] qemu-common: add error-report test

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau Add new tests to check the behaviour of error reporting functions. Signed-off-by: Marc-André Lureau --- .../qemu-common/tests/test-error-report.c | 120 ++ subprojects/qemu-common/meson.build | 2 + subprojects/qemu-common/tests/meson.bui

[PATCH v3 13/16] qemu-common: move glib-compat.h

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau qemu-common will have compatible dependency requirements with QEMU. Since qemu-common won't have a toplevel qemu/osdep.h which would include various system headers, include stdbool.h (bool is used for some declarations here). Replace getenv() with g_getenv() to avoid ext

[PATCH v3 15/16] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-10 Thread marcandre . lureau
From: Marc-André Lureau A subproject test may be simply in the "PROJECT" suite (such as "qemu-common" with the following patches) Signed-off-by: Marc-André Lureau --- scripts/mtest2make.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/mtest2make.py b/scri

[PATCH] ui/dbus: fix win32 compilation when !opengl

2023-07-25 Thread marcandre . lureau
From: Marc-Andre Lureau Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1782 Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 68ff343799..02fc6ae239 100644 --- a/ui/

[PATCH] ui/dbus: fix clang compilation issue

2023-07-26 Thread marcandre . lureau
From: Marc-André Lureau ../ui/dbus-listener.c:236:9: error: expected expression Error *err = NULL; See: https://gitlab.com/qemu-project/qemu/-/issues/1782#note_1488517427 Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[PATCH 1/2] virtio-gpu: free BHs, by implementing unrealize

2023-07-26 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu.c| 10 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/

[PATCH 0/2] virtio-gpu: reset gfx resources in main thread

2023-07-26 Thread marcandre . lureau
From: Marc-André Lureau Hi, See the second patch for details. thanks Marc-André Lureau (2): virtio-gpu: free BHs, by implementing unrealize virtio-gpu: reset gfx resources in main thread include/hw/virtio/virtio-gpu.h | 4 +++ hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu

[PATCH 2/2] virtio-gpu: reset gfx resources in main thread

2023-07-26 Thread marcandre . lureau
From: Marc-André Lureau Calling OpenGL from different threads can have bad consequences if not carefully reviewed. It's not generally supported. In my case, I was debugging a crash in glDeleteTextures from OPENGL32.DLL, where I asked qemu for gl=es, and thus ANGLE implementation was expected. lib

[PATCH 1/2] vmmouse: replace DPRINTF with tracing

2023-08-01 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c| 29 ++--- hw/i386/trace-events | 10 ++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index a56c185f15..fce13a5cde 100644

[PATCH 2/2] vmmouse: use explicit code

2023-08-01 Thread marcandre . lureau
From: Marc-André Lureau It's weird to shift x & y without obvious reason. Let's make this more explicit and future-proof. Signed-off-by: Marc-André Lureau --- hw/i386/vmmouse.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmous

[PATCH v2 0/2] virtio-gpu: fix blob scanout post-load

2024-02-28 Thread marcandre . lureau
From: Marc-André Lureau Hi, The current post-loading code for scanout has a FIXME: it doesn't take the resource region/rect into account. But there is more, when adding blob migration support in commit f66767f75c9, I didn't realize that blob resources could be used for scanouts. This situationn

[PATCH v2 1/2] virtio-gpu: remove needless condition

2024-02-28 Thread marcandre . lureau
From: Marc-André Lureau qemu_create_displaysurface_pixman() never returns NULL. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 1c1ee230b3..ccbe31d759 100644 --- a/hw/

[PATCH v2 2/2] virtio-gpu: fix scanout migration post-load

2024-02-28 Thread marcandre . lureau
From: Marc-André Lureau The current post-loading code for scanout has a FIXME: it doesn't take the resource region/rect into account. But there is more, when adding blob migration support in commit f66767f75c9, I didn't realize that blob resources could be used for scanouts. This situationn leads

[PULL 0/7] Ui patches

2024-02-16 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 3ff11e4dcabe2b5b4c26e49d741018ec326f127f: Merge tag 'pull-target-arm-20240215' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-02-15 17:36:30 +) are available in the Git repository at: https://gitlab.com

[PULL 6/7] meson: Explicitly specify dbus-display1.h dependency

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki Explicitly specify dbus-display1.h as a dependency so that files depending on it will not get compiled too early. Fixes: 1222070e7728 ("meson: ensure dbus-display generated code is built before other units") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Messa

[PULL 1/7] ui: reject extended clipboard message if not activated

2024-02-16 Thread marcandre . lureau
From: Daniel P. Berrangé The extended clipboard message protocol requires that the client activate the extension by requesting a psuedo encoding. If this is not done, then any extended clipboard messages from the client should be considered invalid and the client dropped. Signed-off-by: Daniel P

[PULL 5/7] audio: Depend on dbus_display1_dep

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki dbusaudio needs dbus_display1_dep. Fixes: 739362d4205c ("audio: add "dbus" audio backend") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240214-dbus-v7-1-7eff29f04...@daynix.com> --- audio/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1

[PULL 7/7] tests/qtest: Depend on dbus_display1_dep

2024-02-16 Thread marcandre . lureau
From: Akihiko Odaki It ensures dbus-display1.c will not be recompiled. Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240214-dbus-v7-3-7eff29f04...@daynix.com> --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qte

[PULL 4/7] ui/console: Fix console resize with placeholder surface

2024-02-16 Thread marcandre . lureau
From: Tianlan Zhou In `qemu_console_resize()`, the old surface of the console is keeped if the new console size is the same as the old one. If the old surface is a placeholder, and the new size of console is the same as the placeholder surface (640*480), the surface won't be replace. In this situ

[PULL 2/7] ui/clipboard: mark type as not available when there is no data

2024-02-16 Thread marcandre . lureau
From: Fiona Ebner With VNC, a client can send a non-extended VNC_MSG_CLIENT_CUT_TEXT message with len=0. In qemu_clipboard_set_data(), the clipboard info will be updated setting data to NULL (because g_memdup(data, size) returns NULL when size is 0). If the client does not set the VNC_ENCODING_CL

[PULL 3/7] ui/clipboard: add asserts for update and request

2024-02-16 Thread marcandre . lureau
From: Fiona Ebner Should an issue like CVE-2023-6683 ever appear again in the future, it will be more obvious which assumption was violated. Suggested-by: Marc-André Lureau Signed-off-by: Fiona Ebner Reviewed-by: Marc-André Lureau Message-ID: <20240124105749.204610-2-f.eb...@proxmox.com> ---

[PATCH] tests: skip dbus-display tests that need a console

2024-02-20 Thread marcandre . lureau
From: Marc-André Lureau When compiling with "configure --without-default-devices", the dbus-display-test fails since it implicitly assumes that the machine comes with a default console. There doesn't seem to be an easy way to figure this during build time, so skip the tests requiring the Console

[PATCH] build-sys: add the D-Bus generated header to the dependency

2024-02-06 Thread marcandre . lureau
From: Marc-André Lureau Fixes: rm -rf b; cd b ../configure --enable-modules --target-list=x86_64-softmmu ninja qemu-system-x86_64 In file included from ../ui/dbus-chardev.c:34: ../ui/dbus.h:34:10: fatal error: ui/dbus-display1.h: No such file or directory 34 | #include "ui/dbus-

[PATCH] qapi: document InputMultiTouchType

2024-03-25 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- qapi/ui.json | 12 1 file changed, 12 insertions(+) diff --git a/qapi/ui.json b/qapi/ui.json index 5744c24e3c..53d9143054 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1080,6 +1080,16 @@ # # Type of a multi-touch ev

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

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau Hi, Depending on -Doptimization=, GCC (13.2.1 here) produces different maybe-uninitialized warnings: - g: produces -Werror=maybe-uninitialized errors - 0: clean build - 1: produces -Werror=maybe-uninitialized errors - 2: clean build - 3: produces few -Werror=maybe-uniniti

[PATCH 01/19] util/coroutine: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../util/qemu-coroutine.c:150:8: error: ‘batch’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- util/qemu-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-coroutine.c b/util/qemu-corou

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

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- nbd/client-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd/client-connection.c b/nbd/cli

[PATCH 03/19] hw/qxl: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/display/qxl.c:1352:5: error: ‘pci_region’ may be used uninitialized [-Werror=maybe-uninitialized] ../hw/display/qxl.c:1365:22: error: ‘pci_start’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/display/qxl.c | 4 ++

[PATCH 05/19] block/mirror: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../block/mirror.c:1066:22: error: ‘iostatus’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 1bdce3b657

[PATCH 02/19] util/timer: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../util/qemu-timer.c:198:24: error: ‘expire_time’ may be used uninitialized [-Werror=maybe-uninitialized] ../util/qemu-timer.c:476:8: error: ‘rearm’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- util/qemu-timer.c | 6 +++-

[PATCH 08/19] hw/vhost-scsi: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/scsi/vhost-scsi.c:173:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] It can be reached when num_queues=0. It probably doesn't make much sense to instantiate a vhost-scsi with 0 IO queues though. For now, make vhost_scsi_set_workers() retur

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

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized [-Werror=maybe-uninitialized] ../block/stream.c:176:5: error: ‘len’ may be used uninitialized [-Werror=maybe-uninitialized] trace/trace-block.h:906:9: error: ‘ret’ may be used uninitialized [-Wer

[PATCH 07/19] hw/ahci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/ide/ahci.c:989:58: error: ‘tbl_entry_size’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/ide/ahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index bfefad2

[PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-André Lureau --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sdh

[PATCH 10/19] hw/rdma: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/rdma/rdma_backend.c:129:8: error: ‘ne’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/rdma/rdma_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_ba

[PATCH 11/19] migration/block: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/block.c:966:16: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Given that "cluster_size" must be <= BLK_MIG_BLOCK_SIZE, the previous loop is entered at least once, so 'ret' is assigned a value in all conditions. Signed-off-by: Marc-And

[PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/migration.c:2273:5: error: ‘file’ may be used un

[PATCH 15/19] migration: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized [-Werror=maybe-uninitialized] When 'block' != NULL, 'dirty' is initialized. Signed-off-by: Marc-André Lureau --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi

[PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/block/virtio-blk.c:1212:12: error: ‘rq’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-

[PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../plugins/loader.c:405:15: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 9768b78e

[PATCH 16/19] tests: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../tests/unit/test-block-iothread.c:773:17: error: ‘job’ may be used uninitialized [-Werror=maybe-uninitialized] /usr/include/glib-2.0/glib/gtestutils.h:73:53: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- te

[PATCH 17/19] hw/nvme: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/nvme/ctrl.c:6081:21: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized] It's not obvious that 'result' is set in all code paths. When &result is a returned argument, it's even less clear. Looking at various assignments, 0 seems to be a suitabl

[PATCH 18/19] hw/virtio: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used uninitialized [-Werror=maybe-uninitialized] '&r' is not guaranteed to be assigned when calling -Werror=maybe-uninitialized. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 2

[PATCH 19/19] RFC: hw/virtio: a potential leak fix

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau vhost_svq_get_buf() may return a VirtQueueElement that should be freed. It's unclear to me if the vhost_svq_get_buf() call should always return NULL. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[PATCH 2/2] ui/dbus: filter out pending messages when scanout

2024-03-08 Thread marcandre . lureau
From: Marc-André Lureau The "Listener" connection, being private and under the control of the qemu display, allows for the optimization of discarding pending intermediary messages when queuing a new scanout. This ensures that the client receives only the latest scanout update, improving communica

[PATCH 0/2] ui/dbus: optimize a bit message queuing

2024-03-08 Thread marcandre . lureau
From: Marc-André Lureau Hi, Right now, all display updates are sent to the client, regardless of the speed at which it processes the messages. When QEMU queues a lot of updates, it can result in display delays. We don't have any optimization around this at this point (we may optimize the groupin

[PATCH 1/2] ui/dbus: factor out sending a scanout

2024-03-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 18f556aa73..3f4529dbbd 100644 --- a/ui/dbus-listener.c +++ b/ui

[PULL 1/5] ui/vnc: Respect bound console

2024-03-12 Thread marcandre . lureau
From: Akihiko Odaki ui/vnc may have a bound console so pass it to qemu_console_is_graphic() and qemu_text_console_put_keysym(). Fixes: 1d0d59fe2919 ("vnc: allow binding servers to qemu consoles") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20231211-vnc-v1-1-a3551d2

<    4   5   6   7   8   9   10   11   12   13   >