[PULL 6/9] audio/mixeng: remove unnecessary pointer type casts

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin A simple assignment automatically converts a void pointer type to any other pointer type. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin Message-Id: <20250515054429.7385-6-vr_q...@t-online.de> --- audio/mixeng.c | 8 1 file changed, 4 insertions(+),

[PULL 0/9] Audio patches

2025-05-25 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 668df86ee8076152320345d8e36be7c95ec0a09a: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2025-05-23 09:26:29 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags

[PULL 7/9] audio: add float sample endianness converters

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin Commit ed2a4a7941 ("audio: proper support for float samples in mixeng") added support for float audio samples. As there were no audio frontend devices with float support at that time, the code was limited to native endian float samples. When nobody was paying attention, an a

[PULL 8/9] alsaaudio: Set try-poll to false by default

2025-05-25 Thread marcandre . lureau
From: BALATON Zoltan Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to use an event loop instead of the audio timer. This works most of the time. But the poll event handler in the ALSA backend has a bug. For example, if the guest can't provide enough audio frames in time, the

[PULL 9/9] audio: Reset rate control when adding bytes

2025-05-25 Thread marcandre . lureau
From: Akihiko Odaki Commit 90320051ea99 ("spiceaudio: add a pcm_ops buffer_get_free function") caused to emit messages saying "Resetting rate control" frequently when the guest generates no frames. audio_rate_peek_bytes() resets the rate control when frames < 0 || frames > 65536 where frames is

[PULL 1/9] tests/functional: use 'none' audio driver for q800 tests

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin Since commit ac13a6b3fd ("audio: add Apple Sound Chip (ASC) emulation") the Quadra 800 machine has an audio device. It is not guaranteed that the default audio driver of the audio subsystem will work correctly on all host systems. Therefore, the 'none' audio driver should be

[PULL 4/9] hw/audio/asc: fix SIGSEGV in asc_realize()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin AUD_open_out() may fail and return NULL. This may then lead to a segmentation fault in memset() below. The memset() behaviour is undefined if the pointer to the destination object is a null pointer. Add the missing error handling code. Reviewed-by: Marc-André Lureau Signed

[PULL 3/9] audio: fix size calculation in AUD_get_buffer_size_out()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin The buffer size calculated by AUD_get_buffer_size_out() is often incorrect. sw->hw->samples * sw->hw->info.bytes_per_frame is the size of the mixing engine buffer in audio frames multiplied by the size of one frame of the audio backend. Due to resampling or format conversion,

[PULL 5/9] hw/audio/asc: replace g_malloc0() with g_malloc()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin There is no need to allocate initialized memory with g_malloc0() if it's directly followed by a memset() function call. g_malloc() is sufficient. Reviewed-by: Marc-André Lureau Reviewed-by: Mark Cave-Ayland Signed-off-by: Volker Rümelin Message-Id: <20250515054429.7385-5-

[PULL 2/9] audio: fix SIGSEGV in AUD_get_buffer_size_out()

2025-05-25 Thread marcandre . lureau
From: Volker Rümelin As far as the emulated audio devices are concerned the pointer returned by AUD_open_out() is an opaque handle. This includes the NULL pointer. In this case, AUD_get_buffer_size_out() should return a sensible buffer size instead of triggering a segmentation fault. All other pu

[PULL 12/19] ui/gtk: Use consistent naming for variables in different coordinates

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu Now that we've documented definitions and presentation of various coordinates, let's enforce the rules. Signed-off-by: Weifeng Liu Message-ID: <20250511073337.876650-3-weifeng.li...@gmail.com> Acked-by: Gerd Hoffmann Acked-by: Marc-André Lureau --- ui/gtk-egl.c | 12 ++

[PULL 13/19] gtk/ui: Introduce helper gd_update_scale

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu The code snippet updating scale_x/scale_y is general and will be used in next patch. Make it a function. Signed-off-by: Weifeng Liu Message-ID: <20250511073337.876650-4-weifeng.li...@gmail.com> Acked-by: Gerd Hoffmann Acked-by: Marc-André Lureau --- include/ui/gtk.h | 2 ++

[PULL 03/19] ui/clipboard: split out QemuClipboardContent

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Allows to use VMSTATE STRUCT in following migration support patch. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/clipboard.h | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/include/ui/cli

[PULL 10/19] ui/vdagent: remove migration blocker

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Fixes: https://issues.redhat.com/browse/RHEL-81894 Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/vdagent.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index adc8755bd9..c0746fe5b1 100644 --- a/ui/

[PULL 11/19] ui/gtk: Document scale and coordinate handling

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu The existence of multiple scaling factors forces us to deal with various coordinate systems and this would be confusing. It would be beneficial to define the concepts clearly and use consistent representation for variables in different coordinates. Signed-off-by: Weifeng Liu M

[PULL 05/19] ui/clipboard: delay clipboard update when not running

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau When VM is paused, we shouldn't notify of clipboard changes, similar to how input are being treated. On unsuspend, notify of the current state. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/clipboard.c | 40 +++

[PULL 19/19] ui/gtk-egl: Render guest content with padding in fixed-scale mode

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu Scaling was not respected when rendering frames in gtk-egl.c (used if gl=on and X11 mode). To fix this, add fields x and y to struct egl_fb for x offset and y offset so we can add padding to window. Signed-off-by: Weifeng Liu Message-ID: <20250511073337.876650-10-weifeng.li...

[PULL 15/19] ui/sdl: Consider scaling in mouse event handling

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu When using sdl display backend, if the window is scaled, incorrect mouse positions will be reported since scaling is not properly handled. Fix it by transforming the positions from window coordinate to guest buffer coordinate. Signed-off-by: Weifeng Liu Message-ID: <2025051107

[PULL 14/19] ui/gtk: Update scales in fixed-scale mode when rendering GL area

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu When gl=on, scale_x and scale_y were set to 1 on startup that didn't reflect the real situation of the scan-out in free scale mode, resulting in incorrect cursor coordinates to be sent when moving the mouse pointer. Simply updating the scales before rendering the image fixes thi

[PULL 17/19] ui/gtk: Consider scaling when propagating ui info

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu The ui width and height sent to guest is supposed to be in buffer coordinate. Hence conversion is required. If scaling (global window scale and zooming scale) is not respected in non-free-scale mode, window size could keep changing because of the existence of the iteration of t

[PULL 07/19] ui/vdagent: keep "connected" state

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau During post-load of migration, virtio will notify of fe_open state. However vdagent code will handle this as a reconnection. This will trigger a connection reset/caps with the agent. Check if the state actually changed before resetting the connection. Signed-off-by: Marc

[PULL 04/19] ui/clipboard: add vmstate_cbinfo

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Add a VMStateDescriptor for QemuClipboardInfo. Each clipboard owner will have to save its QemuClipboardInfo and reregister its owned clipboard after loading. (the global cbinfo has only pointers to owners, so it can't restore the relation with its owner if it was to handl

[PULL 08/19] ui/vdagent: factor out clipboard peer registration

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau This allows common code reuse during migration. Note that resetting the serial is now done regardless if the clipboard peer was registered or not. This should still be correct. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/vdagent.c | 20

[PULL 18/19] ui/gtk-gl-area: Render guest content with padding in fixed-scale mode

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu In fixed-scale mode (zoom-to-fit=false), we expect that scale should not change, meaning that if window size is larger than guest surface, padding is supposed to be added to preserve the scale. However, in OpenGL mode (gl=on), guest surface is always painted to the whole canvas

[PULL 16/19] ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c

2025-05-24 Thread marcandre . lureau
From: Weifeng Liu Scale shouldn't be changed until user explicitly requests it in fixed scale mode (full-screen=false and free-scale=false). Use function gd_update_scale to complete scale updating instead. Signed-off-by: Weifeng Liu Message-ID: <20250511073337.876650-7-weifeng.li...@gmail.com>

[PULL 00/19] Ui patches

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 668df86ee8076152320345d8e36be7c95ec0a09a: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2025-05-23 09:26:29 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags

[PULL 06/19] ui/vdagent: replace Buffer with GByteArray

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Buffer is slightly more advanced than GByteArray, since it has a cursor/position. But vdagent code doesn't need it. This simplify a bit the code, and migration state. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/vdagent.c | 25 ---

[PULL 09/19] ui/vdagent: add migration support

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- ui/vdagent.c | 142 +++ 1 file changed, 142 insertions(+) diff --git a/ui/vdagent.c b/ui/vdagent.c index fcbd7b167b..adc8755bd9 100644 --- a/ui/vdagent.

[PULL 02/19] ui/clipboard: use int for selection field

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau This allows to use a VMSTATE_INT32 field for migration purposes. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- include/ui/clipboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboar

[PULL 01/19] ui/gtk: warn if setting the clipboard failed

2025-05-24 Thread marcandre . lureau
From: Marc-André Lureau Just in case. Reviewed-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 8d8a636fd1..65d89ec601 100644 --- a/ui/g

[PULL 6/6] ui/spice: support multi plane dmabuf scanout

2025-05-06 Thread marcandre . lureau
From: Qiang Yu We need spice version >= 0.15.3 which has spice_qxl_gl_scanout2 API for multi plane scanout support. v2: * use new dmabuf API and check length * check spice_qxl_gl_scanout2 present instead of bump spice version dependency Signed-off-by: Qiang Yu Reviewed-by: Marc-André L

[PULL 2/6] ui/egl: require EGL_EXT_image_dma_buf_import_modifiers

2025-05-06 Thread marcandre . lureau
From: Qiang Yu It's used already, just check it explicitly. Reviewed-by: Marc-André Lureau Signed-off-by: Qiang Yu Message-ID: <20250327025848.46962-3-yuq...@gmail.com> --- ui/egl-helpers.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/egl-helpers.c b/ui/eg

[PULL 4/6] ui/egl: support multi-plane dmabuf when egl export/import

2025-05-06 Thread marcandre . lureau
From: Qiang Yu v2: * use new dmabuf API and check length Reviewed-by: Marc-André Lureau Signed-off-by: Qiang Yu [ Fix style ] Signed-off-by: Marc-André Lureau Message-ID: <20250327025848.46962-5-yuq...@gmail.com> --- include/ui/egl-helpers.h | 5 ++- ui/dbus-listener.c | 19 +---

[PULL 0/6] Ui patches

2025-05-06 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 5134cf9b5d3aee4475fe7e1c1c11b093731073cf: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-04-30 13:34:44 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu

[PULL 5/6] ui/dbus: change dbus ScanoutDMABUF interface

2025-05-06 Thread marcandre . lureau
From: Qiang Yu To handle multi plane. v3: * rename interface * add x/y/backing_width/backing_height arg v2: * use new dmabuf API and check length Reviewed-by: Marc-André Lureau Signed-off-by: Qiang Yu Message-ID: <20250327025848.46962-6-yuq...@gmail.com> [ Fix style ] Signed-off-by: Ma

[PULL 3/6] ui/egl: use DRM_FORMAT_MOD_INVALID as default modifier

2025-05-06 Thread marcandre . lureau
From: Qiang Yu 0 is used as DRM_FORMAT_MOD_LINEAR already. Reviewed-by: Marc-André Lureau Signed-off-by: Qiang Yu Message-ID: <20250327025848.46962-4-yuq...@gmail.com> --- hw/display/vhost-user-gpu.c | 3 ++- hw/display/virtio-gpu-udmabuf.c | 4 +++- ui/egl-helpers.c| 3 ++

[PULL 1/6] ui/dmabuf: extend QemuDmaBuf to support multi-plane

2025-05-06 Thread marcandre . lureau
From: Qiang Yu mesa/radeonsi is going to support explicit modifier which may export a multi-plane texture. For example, texture with DCC enabled (a compressed format) has two planes, one with compressed data, the other with meta data for compression. v2: * change API qemu_dmabuf_get_fd/offset/

[PATCH 6/6] RFC: qom/object: simplify object_property_del_all()

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau Since commit 9859fac ("object: release all props"), the code was changed to tracks the already released properties in a hash table. I am not sure why this was done, perhaps to prevent from potential crashes if properties are being added dynamically during release. I am not

[PATCH 4/6] qdev: make release_prop_array() free array and idempotent

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau Fix a memory leak, and allow it to be called multiple times safely. Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c i

[PATCH 0/6] qom/object properties cleanups

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau Hi, While reviewing some related code, I noticed array properties are leaking. I also wonder why I refactored object_property_del_all() with a HashTable, and whether it's really necessary. Here is also a RFC to simplify that code. Marc-André Lureau (6): qdev: make rel

[PATCH 3/6] qdev: make release_tpm() idempotent

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau So it can eventually be called multiple times safely. Signed-off-by: Marc-André Lureau --- backends/tpm/tpm_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index f2d1739e33..16eab82cd2 100644 --- a/backends/tp

[PATCH 5/6] tests: add /qdev/free-properties test

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau Add a simple qdev test to check that allocated properties get free with the object. This test exhibited array leaks before the fixes. Signed-off-by: Marc-André Lureau --- tests/unit/test-qdev.c | 96 ++ tests/unit/meson.build | 1

[PATCH 1/6] qdev: make release_string() idempotent

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau So it can eventually be called multiple times safely. Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 147b3ffd16..bad111833c

[PATCH 2/6] qdev: make release_drive() idempotent

2025-04-29 Thread marcandre . lureau
From: Marc-André Lureau So it can eventually be called multiple times safely. Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties-system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 8e11e6388b..b1083518

[PATCH for-10.1 10/10] ui/vdagent: remove migration blocker

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Fixes: https://issues.redhat.com/browse/RHEL-81894 Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index cc5738a6ea..3b27ba25fb 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -

[PATCH for-10.1 09/10] ui/vdagent: add migration support

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/ui/vdagent.c b/ui/vdagent.c index 125c659af7..cc5738a6ea 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -10,6 +10

[PATCH for-10.1 07/10] ui/vdagent: keep "connected" state

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau During post-load of migration, virtio will notify of fe_open state. However vdagent code will handle this as a reconnection. This will trigger a connection reset/caps with the agent. Check if the state actually changed before resetting the connection. Signed-off-by: Marc

[PATCH for-10.1 08/10] ui/vdagent: factor out clipboard peer registration

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau This allows common code reuse during migration. Note that resetting the serial is now done regardless if the clipboard peer was registered or not. This should still be correct. Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 20 ++-- 1 file changed,

[PATCH for-10.1 05/10] ui/clipboard: delay clipboard update when not running

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau When VM is paused, we shouldn't notify of clipboard changes, similar to how input are being treated. On unsuspend, notify of the current state. Signed-off-by: Marc-André Lureau --- ui/clipboard.c | 40 ++-- 1 file changed, 38 inserti

[PATCH for-10.1 06/10] ui/vdagent: replace Buffer with GByteArray

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Buffer is slightly more advanced than GByteArray, since it has a cursor/position. But vdagent code doesn't need it. This simplify a bit the code, and migration state. Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 25 - 1 file changed, 12 in

[PATCH for-10.1 03/10] ui/clipboard: split out QemuClipboardContent

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Allows to use VMSTATE STRUCT in following migration support patch. Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h

[PATCH for-10.1 04/10] ui/clipboard: add vmstate_cbinfo

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Add a VMStateDescriptor for QemuClipboardInfo. Each clipboard owner will have to save its QemuClipboardInfo and reregister its owned clipboard after loading. (the global cbinfo has only pointers to owners, so it can't restore the relation with its owner if it was to handl

[PATCH for-10.1 02/10] ui/clipboard: use int for selection field

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau This allows to use a VMSTATE_INT32 field for migration purposes. Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index ab6acdbd8a..14b6099e73

[PATCH for-10.1 00/10] Support vdagent migration

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmfQXbMcHG1hcmNhbmRy ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5bmLD/49TJdk8vSnG/G53f3Z UdUGdDiv98lAr/1wPZvmLPGfxiVLrVQK9Rarjnq9+dzmjoJC+w8THyPIvlvlKAQO aNSe5LV2lcYFLZwJqXQdGHTEWWZX3BmXroSFY06F9znX4lrNSg/cxLaI+Lt+dbEt BA9IIMzGYB+z

[PATCH for-10.1 01/10] ui/gtk: warn if setting the clipboard failed

2025-03-11 Thread marcandre . lureau
From: Marc-André Lureau Just in case. Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 8d8a636fd1..65d89ec601 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clip

[PULL 5/6] ui/console-vc: implement DCH (delete) and ICH (insert) commands

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev This patch implements DCH (delete character) and ICH (insert character) commands. DCH - Delete Character: "As characters are deleted, the remaining characters between the cursor and right margin move to the left. Character attributes move with the characters. The t

[PULL 6/6] chardev: use remoteAddr if the chardev is client

2025-03-04 Thread marcandre . lureau
From: Haoqian He If the chardev is client, the socket file path in localAddr may be NULL. This is because the socket path comes from getsockname(), according to man page, getsockname() returns the current address bound by the socket sockfd. If the chardev is client, it's socket is unbound sockfd.

[PULL 4/6] ui/console-vc: add support for cursor DECSC and DECRC commands

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev There are aliases for save and restore cursor commands: * save cursor `ESC 7` (DEC Save Cursor [1], older VT100) `ESC [ s` (CSI Save Cursor, standard ANSI) * load cursor `ESC 8` (DEC Restore Cursor [2], older VT100) `ESC [ u` (CSI Restore Cursor,

[PULL 3/6] ui/console-vc: report cursor position in the screen not in the scroll buffer

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev The format of the CSI cursor position report is `ESC[row;columnR`, where `row` is a row of a cursor in the screen, not in the scrollback buffer. What's the difference? Let's say the terminal screen has 24 lines, no matter how long the scrollback buffer may be, the last line is

[PULL 1/6] ui/console-vc: introduce parsing of the 'ESC ( ' sequence

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev This change introduces parsing of the 'ESC ( ' sequence, which is supposed to change character set [1]. In the QEMU case, the introduced parsing logic does not actually change the character set, but simply parses the sequence and does not let output of a tool to be corrupted w

[PULL 2/6] ui/console-vc: report to the application instead of screen rendering

2025-03-04 Thread marcandre . lureau
From: Roman Penyaev Terminal Device Status Report (DSR) [1] should be sent to an application, not rendered to the screen. This patch fixes rendering of terminal report, which appear only on the graphical screen of the terminal (console "vc") and can be reproduced by the following command: e

[PULL 0/6] Ui patches

2025-03-04 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 661c2e1ab29cd9c4d268ae3f44712e8d421c0e56: scripts/checkpatch: Fix a typo (2025-03-04 09:30:26 +0800) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request for you to fetch change

[PATCH] ui/sdl: only compile dmabuf support if CONFIG_GBM

2025-02-17 Thread marcandre . lureau
From: Marc-André Lureau Fix SDL backend compilation for win32. Fixes: commit 31287d1af4 ("ui/sdl2: Implement dpy dmabuf functions") Signed-off-by: Marc-André Lureau --- ui/sdl2-gl.c | 2 ++ ui/sdl2.c| 4 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index

[PULL v2 1/8] chardev/char-pty: send CHR_EVENT_CLOSED on disconnect

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev Change makes code symmetric to the code, which handles the "connected" state, i.e. send CHR_EVENT_CLOSED when state changes from "connected" to "disconnected". This behavior is similar to char-socket, for example. Signed-off-by: Roman Penyaev Reviewed-by: "Marc-André Lureau

[PULL v2 5/8] ui/dbus: on win32, allow ANONYMOUS with p2p

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau GLib doesn't implement EXTERNAL on win32 at the moment, and disables ANONYMOUS by default. zbus dropped support for COOKIE_SHA1 in 5.0, making it no longer possible to connect to qemu -display dbus. Since p2p connections are gated by existing QMP (or a D-Bus connection),

[PULL v2 6/8] ui/dbus: clarify the kind of win32 handle that is shared

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau "-display dbus" hands over a file mapping handle to the peer process (not a file handle). Signed-off-by: Marc-André Lureau --- ui/dbus-display1.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index

[PULL v2 3/8] tests/unit/test-char: add unit tests for hub chardev backend

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This commit introduces a new test function `char_hub_test` to validate the functionality and constraints of the "hub" chardev backend in QEMU. The test includes multiple scenarios: 1. Invalid hub creation: - Creating a hub without defining `chardevs.N` (expects an error).

[PULL v2 8/8] dbus: add -audio dbus nsamples option

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau Allow to set the number of audio samples per read/write to dbus. Signed-off-by: Marc-André Lureau --- qapi/audio.json | 22 +- audio/dbusaudio.c| 21 ++--- ui/dbus-display1.xml | 12 3 files changed, 51 insertion

[PULL v2 7/8] plugins: fix -Werror=maybe-uninitialized false-positive

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau ../contrib/plugins/cache.c:638:9: error: ‘l2_cache’ may be used uninitialized [-Werror=maybe-uninitialized] 638 | append_stats_line(rep, l1_dmem_accesses, l1_dmisses, | ^~~~ Is a false-positive, sinc

[PULL v2 4/8] qemu-options.hx: describe hub chardev and aggregation of several backends

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This adds a few lines describing `hub` aggregator configuration for aggregation of several backend devices with a single frontend device. Signed-off-by: Roman Penyaev Reviewed-by: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Message-ID: <20250123085327.965501-5-r.peni...@g

[PULL v2 0/8] Ui patches

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-02-02 11:09:10 -0500) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu

[PULL v2 2/8] chardev/char-hub: implement backend chardev aggregator

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This patch implements a new chardev backend `hub` device, which aggregates input from multiple backend devices and forwards it to a single frontend device. Additionally, `hub` device takes the output from the frontend device and sends it back to all the connected backend devic

[PULL 3/8] tests/unit/test-char: add unit tests for hub chardev backend

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This commit introduces a new test function `char_hub_test` to validate the functionality and constraints of the "hub" chardev backend in QEMU. The test includes multiple scenarios: 1. Invalid hub creation: - Creating a hub without defining `chardevs.N` (expects an error).

[PULL 8/8] dbus: add -audio dbus nsamples option

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau Allow to set the number of audio samples per read/write to dbus. Signed-off-by: Marc-André Lureau --- qapi/audio.json | 22 +- audio/dbusaudio.c| 21 ++--- ui/dbus-display1.xml | 12 3 files changed, 51 insertion

[PULL 5/8] ui/dbus: on win32, allow ANONYMOUS with p2p

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau GLib doesn't implement EXTERNAL on win32 at the moment, and disables ANONYMOUS by default. zbus dropped support for COOKIE_SHA1 in 5.0, making it no longer possible to connect to qemu -display dbus. Since p2p connections are gated by existing QMP (or a D-Bus connection),

[PULL 7/8] plugins: fix -Werror=maybe-uninitialized false-positive

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau ../contrib/plugins/cache.c:638:9: error: ‘l2_cache’ may be used uninitialized [-Werror=maybe-uninitialized] 638 | append_stats_line(rep, l1_dmem_accesses, l1_dmisses, | ^~~~ Is a false-positive, sinc

[PULL 4/8] qemu-options.hx: describe hub chardev and aggregation of several backends

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This adds a few lines describing `hub` aggregator configuration for aggregation of several backend devices with a single frontend device. Signed-off-by: Roman Penyaev Reviewed-by: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Message-ID: <20250123085327.965501-5-r.peni...@g

[PULL 6/8] ui/dbus: clarify the kind of win32 handle that is shared

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau "-display dbus" hands over a file mapping handle to the peer process (not a file handle). Signed-off-by: Marc-André Lureau --- ui/dbus-display1.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index

[PULL 1/8] chardev/char-pty: send CHR_EVENT_CLOSED on disconnect

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev Change makes code symmetric to the code, which handles the "connected" state, i.e. send CHR_EVENT_CLOSED when state changes from "connected" to "disconnected". This behavior is similar to char-socket, for example. Signed-off-by: Roman Penyaev Reviewed-by: "Marc-André Lureau

[PULL 2/8] chardev/char-hub: implement backend chardev aggregator

2025-02-03 Thread marcandre . lureau
From: Roman Penyaev This patch implements a new chardev backend `hub` device, which aggregates input from multiple backend devices and forwards it to a single frontend device. Additionally, `hub` device takes the output from the frontend device and sends it back to all the connected backend devic

[PULL 0/8] Ui patches

2025-02-03 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-02-02 11:09:10 -0500) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu

[PATCH] dbus: add -audio dbus nsamples option

2025-01-28 Thread marcandre . lureau
From: Marc-André Lureau Allow to set the number of audio samples per read/write to dbus. Signed-off-by: Marc-André Lureau --- qapi/audio.json | 22 +- audio/dbusaudio.c| 21 ++--- ui/dbus-display1.xml | 12 3 files changed, 51 insertion

[PATCH] migration: fix -Werror=maybe-uninitialized

2025-01-14 Thread marcandre . lureau
From: Marc-André Lureau ../migration/savevm.c: In function ‘qemu_savevm_state_complete_precopy_non_iterable’: ../migration/savevm.c:1560:20: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] 1560 | return ret; |^~~ Cc: Peter Xu Signed-

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

2025-01-14 Thread marcandre . lureau
From: Marc-André Lureau ../contrib/plugins/cache.c:638:9: error: ‘l2_cache’ may be used uninitialized [-Werror=maybe-uninitialized] 638 | append_stats_line(rep, l1_dmem_accesses, l1_dmisses, | ^~~~ Is a false-positive, sinc

[PATCH] ui/dbus: on win32, allow ANONYMOUS with p2p

2025-01-14 Thread marcandre . lureau
From: Marc-André Lureau GLib doesn't implement EXTERNAL on win32 at the moment, and disables ANONYMOUS by default. zbus dropped support for COOKIE_SHA1 in 5.0, making it no longer possible to connect to qemu -display dbus. Since p2p connections are gated by existing QMP (or a D-Bus connection),

[PATCH] ui/dbus: clarify the kind of win32 handle that is shared

2025-01-14 Thread marcandre . lureau
From: Marc-André Lureau "-display dbus" hands over a file mapping handle to the peer process (not a file handle). Signed-off-by: Marc-André Lureau --- ui/dbus-display1.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index

[PULL 1/2] chardev: Fix record/replay error path NULL deref in device creation

2024-12-03 Thread marcandre . lureau
From: Nicholas Piggin qemu_chardev_set_replay() was being called in chardev creation to set up replay parameters even if the chardev is NULL. A segfault can be reproduced by specifying '-serial chardev:bad' with an rr=record mode. Fix this with a NULL pointer check. Reported-by: Peter Maydell

[PULL 0/2] chardev patches

2024-12-03 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit eb22a064455aeebc105cc89bf77f48aa18b52938: Merge tag 'pull-request-2024-12-02' of https://gitlab.com/thuth/qemu into staging (2024-12-02 16:16:15 +) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qe

[PULL 2/2] chardev: Remove __-prefixed names

2024-12-03 Thread marcandre . lureau
From: Nicholas Piggin Peter points out double underscore prefix names tend to be reserved for the system. Clean these up. Suggested-by: Peter Maydell Signed-off-by: Nicholas Piggin Reviewed-by: Marc-André Lureau Reviewed-by: Peter Maydell Message-ID: <20240828043337.14587-3-npig...@gmail.com

[PULL 2/2] chardev/char-mux: make boolean bit check instead of find_next_bit()

2024-12-02 Thread marcandre . lureau
From: Roman Penyaev This patch simplifies (and makes less confusing) bit checks by replacing `find_next_bit()` calls with boolean AND operation. Resolves: Coverity CID 1563776 Signed-off-by: Roman Penyaev Reviewed-by: "Marc-André Lureau" Cc: Peter Maydell Cc: Paolo Bonzini Reviewed-by: Cléme

[PULL 0/2] chardev patches

2024-12-02 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 72b88908d12ee9347d13539c7dd9a252625158d1: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-11-29 10:09:05 +) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git ta

[PULL 1/2] chardev/char-mux: shift unsigned long to avoid 32-bit overflow

2024-12-02 Thread marcandre . lureau
From: Roman Penyaev Allthough the size of MAX_MUX is equal to 4 and likely will never change, this patch changes type of constant to unsigned long to be on the safe side. Also add a static compile check that MAX_MUX never bigger than `sizeof(d->mux_bitset) * BITS_PER_BYTE`. Signed-off-by: Roman

[PATCH] hw/audio/hda: avoid unnecessary re-open stream on reconfiguration

2024-11-05 Thread marcandre . lureau
From: Marc-André Lureau Closing and opening a stream too quickly during reconfiguration create issues with Spice. Note: the issue with Spice has been there before and still is. When the audio stream is recreated, for example when using `out.mixing-engine=false`. Fixes: https://gitlab.com/qemu-p

[PULL 4/8] chardev/mux: convert size members to unsigned int

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev There is no sense to keep `focus`, `mux_cnt`, `prod`, `cons` and `tag` variables as signed, those represent either size, either position in array, which both are unsigned. `focus` member of `MuxChardev` is kept signed, because initially set to -1. Signed-off-by: Roman Penyae

[PULL 5/8] chardev/mux: introduce `mux_chr_attach_frontend() call

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev Move away logic which attaches frontend device to a mux from `char-fe.c` to actual `char-mux.c` implementation and make it a separate function. No logic changes are made. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André

[PULL 6/8] chardev/mux: switch mux frontends management to bitset

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev Frontends can be attached and detached during run-time (although detach is not implemented, but will follow). Counter variable of muxes is not enough for proper attach/detach management, so this patch implements bitset: if bit is set for the `mux_bitset` variable, then fronten

[PULL 7/8] chardev/mux: implement detach of frontends from mux

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev With bitset management now it becomes feasible to implement the logic of detaching frontends from multiplexer. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André Lureau Message-ID: <20241014152408.427700-8-r.peni...@gmail

[PULL 8/8] tests/unit/test-char: implement a few mux remove test cases

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev This patch tests: 1. feasibility of removing mux which does not have frontends attached or frontends were prior detached. 2. inability to remove mux which has frontends attached (mux is "busy") Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.o

[PULL 3/8] chardev/mux: use bool type for `linestart` and `term_got_escape`

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev Those are boolean variables, not signed integers. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André Lureau Message-ID: <20241014152408.427700-4-r.peni...@gmail.com> --- chardev/chardev-internal.h | 4 ++-- chardev/char

[PULL 0/8] Chr patches

2024-10-15 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit aa54f5be44be786636a5d51cc1612ad208a24849: tests: update lcitool to fix freebsd py311-yaml rename (2024-10-14 15:54:24 +0100) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git tags/chr-pull-reques

  1   2   3   4   5   6   7   8   9   10   >