[PATCH v4 3/3] virtio-gpu: fix v2 migration

2024-05-16 Thread marcandre . lureau
From: Marc-André Lureau Commit dfcf74fa ("virtio-gpu: fix scanout migration post-load") broke forward/backward version migration. Versioning of nested VMSD structures is not straightforward, as the wire format doesn't have nested structures versions. Introduce x-scanout-vmstate-version and a

[PATCH v4 2/3] migration: fix a typo

2024-05-16 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index b51212a75b..ff5d589a6d 100644 ---

[PATCH v4 0/3] Fix "virtio-gpu: fix scanout migration post-load"

2024-05-16 Thread marcandre . lureau
From: Marc-André Lureau Hi, The aforementioned patch breaks virtio-gpu device migrations for versions pre-9.0/9.0, both forwards and backwards. Versioning of `VMS_STRUCT` is more complex than it may initially appear, as evidenced in the problematic commit dfcf74fa68c ("virtio-gpu: fix scanout

[PATCH v4 1/3] migration: add "exists" info to load-state-field trace

2024-05-16 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu --- migration/vmstate.c| 5 +++-- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index ef26f26ccd..b51212a75b 100644 ---

[PATCH v3 5/5] virtio-gpu: fix v2 migration

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Commit dfcf74fa ("virtio-gpu: fix scanout migration post-load") broke forward/backward version migration. Versioning of nested VMSD structures is not straightforward, as the wire format doesn't have nested structures versions. Use the previously introduced

[PATCH v3 3/5] hw/boards: add machine_check_version()

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Add optional major/minor version fields to the MachineClass, and a helper to check if the current machine version is >= (major, minor). This function can be used to check for extra migration fields, instead of relying on structure version which are typically associated

[PATCH v3 4/5] Set major/minor for PC and arm machines

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/hw/i386/pc.h | 4 ++- hw/arm/virt.c| 2 ++ hw/i386/pc_piix.c| 74 ++-- hw/i386/pc_q35.c | 62 ++--- 4 files changed, 73 insertions(+),

[PATCH v3 2/5] migration: fix a typo

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index b51212a75b..ff5d589a6d 100644 ---

[PATCH v3 1/5] migration: add "exists" info to load-state-field trace

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu --- migration/vmstate.c| 5 +++-- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index ef26f26ccd..b51212a75b 100644 ---

[PATCH v3 0/5] Fix "virtio-gpu: fix scanout migration post-load"

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau Hi, The aforementioned patch breaks virtio-gpu device migrations for versions pre-9.0/9.0, both forwards and backwards. Versioning of `VMS_STRUCT` is more complex than it may initially appear, as evidenced in the problematic commit dfcf74fa68c ("virtio-gpu: fix scanout

[PATCH] vl: fix "type is NULL" in -vga help

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau A VGA interface is available if it has no class_names, or we can look up any of the names - we shouldn't call module_object_class_by_name(NULL), as happening for ex with TCX or CG3 on x86. Signed-off-by: Marc-André Lureau --- system/vl.c | 13 ++--- 1 file

[PATCH v3] vhost-user-gpu: fix import of DMABUF

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for

[PULL 11/11] ui/sdl2: Allow host to power down screen

2024-05-14 Thread marcandre . lureau
From: Bernhard Beschow By default, SDL disables the screen saver which prevents the host from powering down the screen even if the screen is locked. This results in draining the battery needlessly when the host isn't connected to a wall charger. Fix that by enabling the screen saver.

[PULL 00/11] Ui patches

2024-05-14 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9360070196789cc8b9404b2efaf319384e64b107: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-05-12 13:41:26 +0200) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git

[PULL 05/11] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim This commit updates all instances where fields within the QemuDmaBuf struct are directly accessed, replacing them with calls to these new helper functions. v6: fix typos in helper names in ui/spice-display.c v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of

[PULL 04/11] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim New header and source files are added for containing QemuDmaBuf struct definition and newly introduced helpers for creating/freeing the struct and accessing its data. v10: Change the license type for both dmabuf.h and dmabuf.c from MIT to GPL to be in line with QEMU's

[PULL 07/11] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim This commit introduces utility functions for the creation and deallocation of QemuDmaBuf instances. Additionally, it updates all relevant sections of the codebase to utilize these new utility functions. v7: remove prefix, "dpy_gl_" from all helpers qemu_dmabuf_free()

[PULL 10/11] ui/gtk: Fix mouse/motion event scaling issue with GTK display backend

2024-05-14 Thread marcandre . lureau
From: hikalium Remove gtk_widget_get_scale_factor() usage from the calculation of the motion events in the GTK backend to make it work correctly on environments that have `gtk_widget_get_scale_factor() != 1`. This scale factor usage had been introduced in the commit f14aab420c and at that time

[PULL 06/11] ui/console: Use qemu_dmabuf_set_..() helpers instead

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim This commit updates all occurrences where these fields were set directly have been updated to utilize helper functions. v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of helpers was removed as those were already added by the previous commit Suggested-by:

[PULL 03/11] ui/gtk: Check if fence_fd is equal to or greater than 0

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim 'fence_fd' needs to be validated always before being referenced And the passing condition should include '== 0' as 0 is a valid value for the file descriptor. Suggested-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé

[PULL 09/11] ui/gtk: Add gd_motion_event trace event

2024-05-14 Thread marcandre . lureau
From: hikalium Add gd_motion_event trace event for making it easy to debug gd_motion_event related issues. Signed-off-by: hikalium Reviewed-by: Marc-André Lureau Message-Id: <20240512111435.30121-2-hikal...@hikalium.com> --- ui/gtk.c| 2 ++ ui/trace-events | 1 + 2 files changed, 3

[PULL 02/11] ui/gtk: Draw guest frame at refresh cycle

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim Draw routine needs to be manually invoked in the next refresh if there is a scanout blob from the guest. This is to prevent a situation where there is a scheduled draw event but it won't happen bacause the window is currently in inactive state (minimized or tabified). If draw

[PULL 08/11] ui/console: move QemuDmaBuf struct def to dmabuf.c

2024-05-14 Thread marcandre . lureau
From: Dongwon Kim To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def is moved to dmabuf.c Suggested-by: Marc-André Lureau Reviewed-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Message-Id:

[PULL 01/11] Allow UNIX socket option for VNC websocket

2024-05-14 Thread marcandre . lureau
From: Sergii Zasenko - Remove unix socket option limitation for VNC websocket - Reflect websocket option changes in documentation Signed-off-by: Sergii Zasenko Reviewed-by: Marc-André Lureau Message-Id: <20230724100353.16628-1-ser...@zasenko.name> --- ui/vnc.c| 5 -

[PATCH v2] vhost-user-gpu: fix import of DMABUF

2024-05-13 Thread marcandre . lureau
From: Marc-André Lureau When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for

[PATCH v2 4/4] virtio-gpu: fix v2 migration

2024-05-13 Thread marcandre . lureau
From: Peter Xu Commit dfcf74fa ("virtio-gpu: fix scanout migration post-load") broke forward/backward version migration. Versioning of nested VMSD structures is not straightforward, as the wire format doesn't have nested structures versions. Use the x-vmstate-version introduced before and a

[PATCH v2 2/4] migration: fix a typo

2024-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- migration/vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index b51212a75b..ff5d589a6d 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -479,7

[PATCH v2 3/4] virtio-gpu: add x-vmstate-version

2024-05-13 Thread marcandre . lureau
From: Marc-André Lureau Machine <= 8.2 use v1. Following patch will adjust to v2 for other machines to fix migration. Signed-off-by: Marc-André Lureau Reviewed-by: Fabiano Rosas --- include/hw/virtio/virtio-gpu.h | 1 + hw/core/machine.c | 1 + hw/display/virtio-gpu.c|

[PATCH v2 1/4] migration: add "exists" info to load-state-field trace

2024-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu --- migration/vmstate.c| 5 +++-- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index ef26f26ccd..b51212a75b 100644 ---

[PATCH v2 0/4] Fix "virtio-gpu: fix scanout migration post-load"

2024-05-13 Thread marcandre . lureau
From: Marc-André Lureau Hi, The aforementioned patch breaks virtio-gpu device migrations for versions pre-9.0/9.0, both forwards and backwards. Versioning of `VMS_STRUCT` is more complex than it may initially appear, as evidenced in the problematic commit dfcf74fa68c ("virtio-gpu: fix scanout

[PATCH 4/4] virtio-gpu: add x-vmstate-version

2024-05-07 Thread marcandre . lureau
From: Marc-André Lureau Machine <= 8.2 use v1. Signed-off-by: Marc-André Lureau --- include/hw/virtio/virtio-gpu.h | 1 + hw/core/machine.c | 1 + hw/display/virtio-gpu.c| 6 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH 3/4] virtio-gpu: use a VMState variant for the scanout field

2024-05-07 Thread marcandre . lureau
From: Marc-André Lureau Depending on the version, use v1 or v2 of the scanout VM state. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c

[PATCH 2/4] include/migration: add VMSTATE_VSTRUCT_TEST_VARRAY_UINT32

2024-05-07 Thread marcandre . lureau
From: Marc-André Lureau Add a macro to declare a VMState field which contains an array of struct with a specific version. Signed-off-by: Marc-André Lureau --- include/migration/vmstate.h | 12 1 file changed, 12 insertions(+) diff --git a/include/migration/vmstate.h

[PATCH 1/4] migration: add "exists" info to load-state-field trace

2024-05-07 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- migration/vmstate.c| 5 +++-- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration/vmstate.c b/migration/vmstate.c index ef26f26ccd..b51212a75b 100644 --- a/migration/vmstate.c

[PATCH 0/4] Fix "virtio-gpu: fix scanout migration post-load"

2024-05-07 Thread marcandre . lureau
From: Marc-André Lureau Hi, The aforementioned patch breaks virtio-gpu device migrations for versions pre-9.0/9.0, both forwards and backwards. Versioning of `VMS_STRUCT` is more complex than it may initially appear, as evidenced in the problematic commit dfcf74fa68c ("virtio-gpu: fix scanout

[PATCH] vhost-user-gpu: fix import of DMABUF

2024-04-15 Thread marcandre . lureau
From: Marc-André Lureau When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for

[PATCH] vl: fix "type is NULL" in -vga help

2024-04-15 Thread marcandre . lureau
From: Marc-André Lureau Don't pass NULL to module_object_class_by_name(). Signed-off-by: Marc-André Lureau --- system/vl.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/system/vl.c b/system/vl.c index c644222982..23e1cb016f 100644 --- a/system/vl.c +++

[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

[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] '' 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 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 is a returned argument, it's even less clear. Looking at various assignments, 0 seems to be a suitable

[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 ---

[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

[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

[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

[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

[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:

[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

[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

[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

[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

[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()

[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 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

[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 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

[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

[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

[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

[PULL 5/5] ui: compile dbus-display1.c with -fPIC as necessary

2024-03-20 Thread marcandre . lureau
From: Marc-André Lureau Building dbus-display1.c explicitly as a static library drops -fPIC by default, which may not be correct if it ends up linked to a shared library. Let the target decide how to build the unit, with or without -fPIC. This makes commit 186acfbaf7 ("tests/qtest: Depend on

[PULL 4/5] ui/curses: Do not use console_select()

2024-03-20 Thread marcandre . lureau
From: Akihiko Odaki ui/curses is the only user of console_select(). Move the implementation to ui/curses. Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240319-console-v2-4-3fd6feef3...@daynix.com> --- include/ui/console.h | 1 - ui/console-priv.h | 2 +-

[PULL 0/5] Ui patches

2024-03-20 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit c62d54d0a8067ffb3d5b909276f7296d7df33fa7: Update version for v9.0.0-rc0 release (2024-03-19 19:13:52 +) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request for you to

[PULL 2/5] ui/vnc: Do not use console_select()

2024-03-20 Thread marcandre . lureau
From: Akihiko Odaki console_select() is shared by other displays and a console_select() call from one of them triggers console switching also in ui/curses, circumventing key state reinitialization that needs to be performed in preparation and resulting in stuck keys. Use its internal state to

[PULL 3/5] ui/cocoa: Do not use console_select()

2024-03-20 Thread marcandre . lureau
From: Akihiko Odaki ui/cocoa needs to update the UI info and reset the keyboard state tracker when switching the console, or the new console will see the stale UI info or keyboard state. Previously, updating the UI info was done with cocoa_switch(), but it is meant to be called when the surface

[PULL 1/5] ui/vc: Do not inherit the size of active console

2024-03-20 Thread marcandre . lureau
From: Akihiko Odaki A chardev-vc used to inherit the size of a graphic console when its size not explicitly specified, but it often did not make sense. If a chardev-vc is instantiated during the startup, the active graphic console has no content at the time, so it will have the size of graphic

[PATCH] ui: compile dbus-display1.c with -fPIC as necessary

2024-03-19 Thread marcandre . lureau
From: Marc-André Lureau Building dbus-display1.c explicitly as a static library drops -fPIC by default, which may not be correct if it ends up linked to a shared library. Let the target decide how to build the unit, with or without -fPIC. This makes commit 186acfbaf7 ("tests/qtest: Depend on

[PULL 4/5] virtio-gpu: remove needless condition

2024-03-12 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 ---

[PULL 3/5] ui/dbus: filter out pending messages when scanout

2024-03-12 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

[PULL 5/5] virtio-gpu: fix scanout migration post-load

2024-03-12 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

[PULL 2/5] ui/dbus: factor out sending a scanout

2024-03-12 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 +++

[PULL 0/5] UI patches

2024-03-12 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 8f3f329f5e0117bd1a23a79ab751f8a7d3471e4b: Merge tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu into staging (2024-03-12 11:35:41 +) are available in the Git repository at:

[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:

[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 +++

[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

[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

[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

[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 ---

[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] 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

[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> ---

[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

[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

[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

[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(+),

[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

[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

[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:

[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

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

2024-01-15 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 | 4 1 file changed, 4 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index f8a675eb30..a62ffb1627 100644 ---

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

2024-01-15 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 2/2] virtio-gpu: fix scanout migration post-load

2024-01-15 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

[PULL 1/3] ui/gtk-egl: move function calls back to regular code path

2023-12-04 Thread marcandre . lureau
From: Volker Rümelin Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") introduced a regression when QEMU is running with a virtio-gpu-gl-device on a host under X11. After the guest has initialized the virtio-gpu-gl-device, the guest screen only shows "Display output is not

[PULL 3/3] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-04 Thread marcandre . lureau
From: Volker Rümelin The virtio-sound device is currently not migratable. QEMU crashes on the source machine at some point during the migration with a segmentation fault. Even with this bug fixed, the virtio-sound device doesn't migrate the state of the audio streams. For example, running

[PULL 2/3] ui/vnc-clipboard: fix inflate_buffer

2023-12-04 Thread marcandre . lureau
From: Fiona Ebner Commit d921fea338 ("ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255)") removed this hunk, but it is still required, because it can happen that stream.avail_in becomes zero before coming across a return value of Z_STREAM_END in the loop. This fixes the

[PULL 0/3] UI patches

2023-12-04 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29b5d70cb70574b499517ec9e9f80dea496a3cc0: Merge tag 'pull-ppc-for-8.2-20231130' of https://gitlab.com/npiggin/qemu into staging (2023-12-01 07:29:52 -0500) are available in the Git repository at:

[PULL 5/5] ui/pixman-minimal.h: fix empty allocation

2023-11-21 Thread marcandre . lureau
From: Manos Pitsidianakis In the minimal pixman API stub that is used when the real pixman dependency is missing a NULL dereference happens when virtio-gpu-rutabaga allocates a pixman image with bits = NULL and rowstride_bytes = zero. A buffer of rowstride_bytes * height is allocated which is

[PULL 1/5] vl: revert behaviour for -display none

2023-11-21 Thread marcandre . lureau
From: Marc-André Lureau Commit 1bec1cc0d ("ui/console: allow to override the default VC") changed the behaviour of the "-display none" option, so that it now creates a QEMU monitor on the terminal. "-display none" should not be tangled up with whether we create a monitor or a serial terminal; it

[PULL 2/5] ui: use "vc" chardev for dbus, gtk & spice-app

2023-11-21 Thread marcandre . lureau
From: Marc-André Lureau Those display have their own implementation of "vc" chardev, which doesn't use pixman. They also don't implement the width/height/cols/rows options, so qemu_display_get_vc() should return a compatible argument. This patch was meant to be with the pixman series, when the

[PULL 3/5] ui/console: fix default VC when there are no display

2023-11-21 Thread marcandre . lureau
From: Marc-André Lureau When display is "none", we may still have remote displays (I think it would be simpler if VNC/Spice were regular display btw). Return the default VC then, and set them up to fix a regression when using remote display and it used the TTY instead. Fixes:

[PULL 0/5] Ui patches

2023-11-21 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit af9264da80073435fd78944bc5a46e695897d7e5: Merge tag '20231119-xtensa-1' of https://github.com/OSLL/qemu-xtensa into staging (2023-11-20 05:25:19 -0500) are available in the Git repository at:

[PULL 4/5] vl: add missing display_remote++

2023-11-21 Thread marcandre . lureau
From: Marc-André Lureau We should also consider -display vnc= as setting up a remote display, and not attempt to add another default one. The display_remote++ in qemu_setup_display() isn't necessary at this point, but is there for completeness and further usages of the variable. Fixes:

  1   2   3   4   5   6   7   8   9   10   >