Re: [PULL 00/11] Ui patches

2024-05-15 Thread Marc-André Lureau
Hi On Wed, May 15, 2024 at 2:29 PM Michael Tokarev wrote: > > 14.05.2024 16:17, marcandre.lur...@redhat.com wrote: > > > > UI: small fixes and improvements > > > > >

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

2024-05-14 Thread Marc-André Lureau
Hi On Tue, May 14, 2024 at 8:35 AM Peter Xu wrote: > > Hey, Marc-Andre, > > On Mon, May 13, 2024 at 11:19:04AM +0400, marcandre.lur...@redhat.com wrote: > > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c > > index ae831b6b3e..7f9fb5eacc 100644 > > --- a/hw/display/virtio-gpu.c >

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

2024-05-13 Thread Marc-André Lureau
Hi Fiona On Mon, May 13, 2024 at 4:56 PM Fiona Ebner wrote: > > Hi, > > Am 13.05.24 um 09:19 schrieb marcandre.lur...@redhat.com: > > From: Marc-André Lureau > > > > Hi, > > > > The aforementioned patch breaks virtio-gpu device migrations f

Re: [PATCH] ui/sdl2: Allow host to power down screen

2024-05-13 Thread Marc-André Lureau
ll charger. Fix that > by > enabling the screen saver. > > Signed-off-by: Bernhard Beschow Acked-by: Marc-André Lureau > --- > ui/sdl2.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ui/sdl2.c b/ui/sdl2.c > index 4971963f00..0a0eb5a42d 100644 > ---

Re: [PATCH v2 2/2] ui/gtk: Fix mouse/motion event scaling issue with GTK display backend

2024-05-13 Thread Marc-André Lureau
y - my) / vc->gfx.scale_y * ws; > +/* > + * `motion` is reported in `widget` coordinates > + * so translating it to the coordinates in `vc`. > + */ > +x = (motion->x - mx) / vc->gfx.scale_x; > +y = (motion->y - my) / vc->gfx.scale_y; > > trace_gd_motion_event(ww, wh, gtk_widget_get_scale_factor(widget), x, y); > > -- > 2.39.2 > > -- Marc-André Lureau

Re: [PATCH v2 1/2] ui/gtk: Add gd_motion_event trace event

2024-05-13 Thread Marc-André Lureau
On Sun, May 12, 2024 at 3:16 PM hikalium wrote: > > Add gd_motion_event trace event for making it easy to debug > gd_motion_event related issues. > > Signed-off-by: hikalium Acked-by: Marc-André Lureau > --- > ui/gtk.c| 2 ++ > ui/trace-events | 1 + > 2

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

2024-05-11 Thread Marc-André Lureau
Hi Peter On Fri, May 10, 2024 at 9:33 PM Peter Xu wrote: > > Hi, Marc-André, > > On Fri, May 10, 2024 at 12:39:34PM +0400, Marc-André Lureau wrote: > > Since we don't have per VMSD version information on the wire, nested > > struct versioning is quite limited and c

Re: [PATCH v14 0/6] ui/console: Private QemuDmaBuf struct

2024-05-10 Thread Marc-André Lureau
g, and > accessing individual fields within the struct and replacing all direct > references to individual fields in the struct with methods using helpers > throughout the codebase. > > This change was made based on a suggestion from Marc-André Lureau > > > (Resumitting same patc

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

2024-05-10 Thread Marc-André Lureau
Hi Michael On Fri, May 10, 2024 at 2:26 PM Michael S. Tsirkin wrote: > > On Tue, May 07, 2024 at 03:19:19PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Depending on the version, use v1 or v2 of the scanout VM state. > > > &

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

2024-05-10 Thread Marc-André Lureau
Hi On Wed, May 8, 2024 at 12:01 AM Peter Xu wrote: > > On Tue, May 07, 2024 at 03:19:19PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Depending on the version, use v1 or v2 of the scanout VM state. > > > > Signed-off-by

Re: Hermetic virtio-vsock in QEMU

2024-05-08 Thread Marc-André Lureau
PI. (you can also share other things like D3D textures etc. those mechanisms are used to enable -display dbus on Windows efficiently) -- Marc-André Lureau

Re: [PATCH v13 5/6] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-05-08 Thread Marc-André Lureau
t > do it. > > --- 'dmabuf' is now allocated space so it should be freed at the end of > dbus_scanout_texture > > v13: --- Immediately free dmabuf after it is released to prevent possible > leaking of the ptr > (Marc-André Lureau ) > > --

Re: [PATCH v10 09/10] virtio-gpu: Register capsets dynamically

2024-05-08 Thread Marc-André Lureau
RM capsets. Register capsets dynamically to avoid that > problem. > > Signed-off-by: Pierre-Eric Pelloux-Prayer > Signed-off-by: Dmitry Osipenko Reviewed-by: Marc-André Lureau > --- > hw/display/virtio-gpu-gl.c | 6 -- > hw/display/virtio-gpu-virgl.c | 33 +

Re: [PATCH v10 06/10] virtio-gpu: Support blob scanout using dmabuf fd

2024-05-08 Thread Marc-André Lureau
by: Antonio Caggiano > Signed-off-by: Dmitry Osipenko Acked-by: Marc-André Lureau > --- > hw/display/virtio-gpu-virgl.c | 109 + > hw/display/virtio-gpu.c| 12 ++-- > include/hw/virtio/virtio-gpu.h | 7 +++ > meson.build

Re: [PATCH v10 05/10] virtio-gpu: Add virgl resource management

2024-05-08 Thread Marc-André Lureau
at will be contain > fields specific to virgl. > > Signed-off-by: Huang Rui > Reviewed-by: Antonio Caggiano > Signed-off-by: Dmitry Osipenko Reviewed-by: Marc-André Lureau > --- > hw/display/virtio-gpu-virgl.c | 74 +++ > 1 file cha

Re: [PATCH v10 03/10] virtio-gpu: Support context-init feature with virglrenderer

2024-05-08 Thread Marc-André Lureau
son.build > +++ b/meson.build > @@ -2288,6 +2288,7 @@ config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) > config_host_data.set('CONFIG_VNC_SASL', sasl.found()) > if virgl.version().version_compare('>=1.0.0') >config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1) > + config_host_data.set('HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS', 1) > endif > config_host_data.set('CONFIG_VIRTFS', have_virtfs) > config_host_data.set('CONFIG_VTE', vte.found()) > -- > 2.44.0 > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [PATCH v10 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-05-07 Thread Marc-André Lureau
Hi On Tue, May 7, 2024 at 7:18 PM Marc-André Lureau wrote: > > Hi > > On Sun, May 5, 2024 at 12:29 AM Dmitry Osipenko > wrote: > > > > New virglrerenderer features were stabilized with release of v1.0.0. > > Presence of symbols in virglrenderer.h doesn't guarant

Re: [PATCH v10 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-05-07 Thread Marc-André Lureau
t('CONFIG_VIRTFS', have_virtfs) > config_host_data.set('CONFIG_VTE', vte.found()) > -- > 2.44.0 > -- Marc-André Lureau

Re: [PATCH v10 01/10] virtio-gpu: Unrealize GL device

2024-05-07 Thread Marc-André Lureau
/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -336,6 +336,7 @@ void virtio_gpu_virgl_fence_poll(VirtIOGPU *g); > void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g); > void virtio_gpu_virgl_reset(VirtIOGPU *g); > int virtio_gpu_virgl_init(VirtIOGPU *g); > +void virtio_gpu_virgl_deinit(VirtIOGPU *g); > int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g); > > #endif > -- > 2.44.0 > otherwise: Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [PATCH] ui/gtk: Explicitly set the default size of new window when untabifying

2024-05-07 Thread Marc-André Lureau
should cause a window size reconfiguration - the window size != display size thanks > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > ui/gtk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ui/gtk.c b/ui/gtk.c

Re: [PATCH v2] ui/gtk: Draw guest frame at refresh cycle

2024-05-07 Thread Marc-André Lureau
e window is currently in inactive state > (minimized or tabified). If draw is not done for a long time, > gl_block timeout and/or fence timeout (on the guest) will happen > eventually. > > v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c > > Suggested-by: Vivek Kasireddy > Cc:

Re: [PATCH v3] input-linux: Add option to not grab a device upon guest startup

2024-05-07 Thread Marc-André Lureau
Hi On Wed, Apr 3, 2024 at 9:51 AM Justinien Bouron wrote: > > Depending on your use-case, it might be inconvenient to have qemu grab > the input device from the host immediately upon starting the guest. > > Added a new bool option to input-linux: grab-on-startup. If true, the > device is grabbed

Re: [PATCH v12 6/6] ui/console: move QemuDmaBuf struct def to dmabuf.c

2024-05-07 Thread Marc-André Lureau
On Thu, Apr 25, 2024 at 5:58 AM wrote: > > From: Dongwon Kim > > To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def > is moved to dmabuf.c > > Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Daniel P. Berrangé > Cc:

Re: [PATCH v12 5/6] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-05-07 Thread Marc-André Lureau
t > do it. > > --- 'dmabuf' is now allocated space so it should be freed at the end of > dbus_scanout_texture > > Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Daniel P. Berrangé > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > -

Re: [PATCH v12 4/6] ui/console: Use qemu_dmabuf_set_..() helpers instead

2024-05-07 Thread Marc-André Lureau
ction of helpers was removed as those were already added > by the previous commit > > 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 > --- >

Re: [PATCH v12 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-05-07 Thread Marc-André Lureau
et qemu_dmabuf_fee to call qemu_dmabuf_close before freeing > the struct to make sure fd is closed. > (Daniel P. Berrangé ) > > v12: Not closing fd in qemu_dmabuf_free because there are cases fd > should still be available even after the struct is destroyed > (

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

2024-05-07 Thread Marc-André Lureau
Hi On Tue, Apr 30, 2024 at 4:31 PM Fiona Ebner wrote: > > Am 12.03.24 um 15:02 schrieb marcandre.lur...@redhat.com: > > From: Marc-André Lureau > > > > The current post-loading code for scanout has a FIXME: it doesn't take > > the resource region/rect into ac

Re: [PATCH v6 1/3] ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers

2024-04-17 Thread Marc-André Lureau
mabuf_get_... helpers to extract > > > specific fields from the QemuDmaBuf struct. It also updates all > > > instances where fields within the QemuDmaBuf struct are directly > > > accessed, replacing them with calls to these new helper functions. > > > > >

Re: [PATCH v6 3/3] ui/console: Introduce dpy_gl_qemu_dmabuf_new() and free() helpers

2024-04-17 Thread Marc-André Lureau
> Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > include/hw/vfio/vfio-common.h | 2 +- > include/hw/virtio/virtio-gpu.h | 4 ++-- > include/ui/console.h| 8 +++

Re: [PATCH v6 1/3] ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers

2024-04-17 Thread Marc-André Lureau
ccessed, replacing > them with calls to these new helper functions. > > v6: fix typos in helper names in ui/spice-display.c > > Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > include/ui/console.h

Re: [PATCH v5 1/3] ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers

2024-04-16 Thread Marc-André Lureau
ccessed, replacing > them with calls to these new helper functions. > > Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > include/ui/console.h| 17 + > hw/display/vhost-user-gpu.c

Re: [PATCH] chardev/char-win-stdio: Fix keyboard input after exit Qemu on

2024-04-16 Thread Marc-André Lureau
Hi Irina On Mon, Mar 25, 2024 at 10:44 AM Marc-André Lureau wrote: > > Hi > > On Sun, Mar 24, 2024 at 7:23 PM Irina Ryapolova > wrote: > > > > After exit Qemu need to return the terminal to the default state. > > > > Signed-off-by: Irina Ryapolova &g

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

2024-04-16 Thread Marc-André Lureau
Hi On Tue, Apr 16, 2024 at 1:00 AM Kim, Dongwon wrote: > > Hi Marc-André, > > > -Original Message- > > From: marcandre.lur...@redhat.com > > Sent: Monday, April 15, 2024 4:16 AM > > To: qemu-devel@nongnu.org > > Cc: Kim, Dongwon ; dbas...@redhat.

Re: [PATCH v5 1/3] ui/console: Introduce dpy_gl_qemu_dmabuf_get_..() helpers

2024-04-15 Thread Marc-André Lureau
fic fields from the QemuDmaBuf struct. It also updates all instances > where fields within the QemuDmaBuf struct are directly accessed, replacing > them with calls to these new helper functions. > > Suggested-by: Marc-André Lureau > Cc: Philippe Mathieu-Daudé > Cc: Vivek Kasire

Re: [PATCH v2 01/13] ui/console-vc: Replace sprintf() by snprintf()

2024-04-11 Thread Marc-André Lureau
> [-Wdeprecated-declarations] > sprintf(response, "\033[%d;%dR", > ^ > 1 warning generated. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > ui/console-vc.c | 2 +- > 1 file change

Re: [PATCH 01/12] ui/console-vc: Replace sprintf() by g_strdup_printf()

2024-04-11 Thread Marc-André Lureau
f(3) instead. > [-Wdeprecated-declarations] > sprintf(response, "\033[%d;%dR", > ^ > 1 warning generated. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > ui/console-vc.c | 4 ++-- > 1 fil

Re: [PATCH RFC v1]display: fix heap use after free in cursor_put

2024-04-10 Thread Marc-André Lureau
Hi On Wed, Apr 10, 2024 at 2:06 PM ゞlym <707242...@qq.com> wrote: > > Please send the patch as inline: https://www.qemu.org/docs/master/devel/submitting-a-patch.html#do-not-send-as-an-attachment The patch is doing too much changes to the ssd.lock usage without explaining in detail which race

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

2024-04-03 Thread Marc-André Lureau
Hi On Wed, Apr 3, 2024 at 12:31 PM Vladimir Sementsov-Ogievskiy wrote: > > On 03.04.24 11:11, Marc-André Lureau wrote: > > Hi > > > > On Tue, Apr 2, 2024 at 11:24 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> On 02.04.24 18:34, Eric Blake

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

2024-04-03 Thread Marc-André Lureau
#define WITH_GRAPH_RDLOCK_GUARD() \ -WITH_GRAPH_RDLOCK_GUARD_(glue(graph_lockable_auto, __COUNTER__)) +WITH_GRAPH_RDLOCK_GUARD_(glue(graph_lockable_auto, __COUNTER__), glue(graph_lockable_auto, __COUNTER__)) Unfortunately, it doesn't work in all cases. It seems to have issues with some guards: ../block/stream.c: In function ‘stream_run’: ../block/stream.c:216:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] 216 | if (ret < 0) { What should we do? change the macros + cherry-pick the missing false-positives, or keep this series as is? -- Marc-André Lureau

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

2024-04-02 Thread Marc-André Lureau
Hi On Thu, Mar 28, 2024 at 3:31 PM Philippe Mathieu-Daudé wrote: > > On 28/3/24 11:20, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized > > [-Werror=maybe-uninitialized] &

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

2024-04-02 Thread Marc-André Lureau
Hi On Fri, Mar 29, 2024 at 12:35 PM Vladimir Sementsov-Ogievskiy wrote: > > On 28.03.24 13:20, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > ../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized > > [-Werror=may

Compiling QEMU with different optimization levels & -Werror=maybe-uninitialized

2024-03-27 Thread Marc-André Lureau
errors They are about 20, probably false-positives, although it's understandable the compiler is confused as I am too sometime! Is it a known issue? Are we willing to help the compiler in all those optimization levels? I can send a patch series for review in this case. thanks -- Marc-André Lureau

Re: [PATCH] chardev/char-win-stdio: Fix keyboard input after exit Qemu on

2024-03-25 Thread Marc-André Lureau
= INVALID_HANDLE_VALUE) { > TerminateThread(stdio->hInputThread, 0); > } > + > +GetConsoleMode(stdio->hStdIn, ); > +dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT; > +SetConsoleMode(stdio->hStdIn, dwMode); I'd suggest saving the mode when opening instead, to make sure we restore the same value. thanks -- Marc-André Lureau

Re: [PATCH v4 1/3] ui/console: Introduce dpy_gl_dmabuf_get_height/width() helpers

2024-03-22 Thread Marc-André Lureau
accessed directly. If we want to make the whole structure private, we will probably need setters. I don't see why the function should silently return 0 when given NULL. Imho an assert(dmabuf != NULL) is appropriate (or g_return_val_if_fail). > Cc: Philippe Mathieu-Daudé > Cc: Marc-A

Re: [PATCH v4 2/3] ui/console: Introduce dpy_gl_dmabuf_get_fd() helper

2024-03-22 Thread Marc-André Lureau
e Mathieu-Daudé > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > include/ui/console.h | 1 + > hw/vfio/display.c| 8 +++- > ui/console.c | 9 + > 3 files changed, 17 insertions(+), 1 deletion(-) > > diff

Re: [PATCH v4 3/3] ui/console: Introduce dpy_gl_create_dmabuf() helper

2024-03-22 Thread Marc-André Lureau
heir > own. > > Cc: Philippe Mathieu-Daudé > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > include/hw/vfio/vfio-common.h | 2 +- > include/hw/virtio/virtio-gpu.h | 4 ++-- > include/ui/console.h|

Re: [PATCH] Implement SSH commands in QEMU GA for Windows

2024-03-20 Thread Marc-André Lureau
ng, Error **errp) > +{ There is g_utf8_to_utf16() which can be cast to wchar_t, iirc, that's how glib converts string for w32 api -- Marc-André Lureau

Re: [PATCH v2 0/4] ui/console: Remove console_select()

2024-03-20 Thread Marc-André Lureau
Hi On Wed, Mar 20, 2024 at 7:20 AM Akihiko Odaki wrote: > > On 2024/03/19 17:29, Marc-André Lureau wrote: > > Hi Akihiko > > > > On Tue, Mar 19, 2024 at 7:09 AM Akihiko Odaki > > wrote: > >> > >> ui/console has a concept of "active"

Re: [PATCH v2 0/4] ui/console: Remove console_select()

2024-03-19 Thread Marc-André Lureau
quot;active" console state from ui/console. > curses, cocoa, and vnc will hold the reference to the console currently > shown with DisplayListener::con. This also eliminates the need to > replace NULL with the active console and save code. > > Signed-off-by: Akihiko Odaki lgtm R

Re: [PATCH 3/3 for 9.0] Revert "chardev: use a child source for qio input source"

2024-03-18 Thread Marc-André Lureau
01,10 +133,23 @@ GSource *io_add_watch_poll(Chardev *chr, > return (GSource *)iwp; > } > > +static void io_remove_watch_poll(GSource *source) > +{ > +IOWatchPoll *iwp; > + > +iwp = io_watch_poll_from_source(source); > +if (iwp->src) { > +g_source_destroy(iwp->src); > +g_source_unref(iwp->src); > +iwp->src = NULL; > +} > +g_source_destroy(>parent); > +} > + > void remove_fd_in_watch(Chardev *chr) > { > if (chr->gsource) { > -g_source_destroy(chr->gsource); > +io_remove_watch_poll(chr->gsource); > chr->gsource = NULL; > } > } > -- > 2.43.0 > > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [PATCH 1/3 for 9.0] chardev: lower priority of the HUP GSource in socket chardev

2024-03-18 Thread Marc-André Lureau
2 GSource objects. This can be achieved by lowering the > priority of the HUP GSource, so that it is never dispatched if the > main GSource is also ready to dispatch. Counter-intuitively, lowering > the priority of a GSource is done by raising its priority number. > > Signed-off-by: Da

Re: [PATCH 2/3 for 9.0] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 10:23 PM Daniel P. Berrangé wrote: > > This commit results in unexpected termination of the TLS connection. > When 'fd_can_read' returns 0, the code goes on to pass a zero length > buffer to qio_channel_read. The TLS impl calls into gnutls_recv() > with this zero

Re: [PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Marc-André Lureau
Hi On Mon, Mar 18, 2024 at 1:05 PM Akihiko Odaki wrote: > > On 2024/03/18 17:21, Marc-André Lureau wrote: > > Hi > > > > On Mon, Mar 18, 2024 at 11:58 AM Akihiko Odaki > > wrote: > >> > >> console_select() is shared by other displays and a cons

Re: [PATCH 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Marc-André Lureau
> +vs->vd->dcl.con = con; > +register_displaychangelistener(>vd->dcl); > +} > return; > } > default: > @@ -4206,7 +4210,7 @@ void vnc_display_open(const char *id, Error **errp) > goto fail; > } > } else { > -con = NULL; > +con = qemu_console_lookup_first_graphic_console(); why this change here? otherwise, lgtm > } > > if (con != vd->dcl.con) { > > -- > 2.44.0 > > -- Marc-André Lureau

Re: [PATCH 1/4] ui/vc: Do not inherit the size of active console

2024-03-18 Thread Marc-André Lureau
has no content at the time, so it will have the size of graphic > console placeholder, which contains no useful information. It's better > to have the standard size of text console instead. > > Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau > --- > ui/console-v

Re: Regression in v7.2.10 - ui-dbus.so requires -fPIC

2024-03-18 Thread Marc-André Lureau
dbus_display1[0]) + dbus_display1_dep = declare_dependency(sources: dbus_display1, dependencies: gio) This makes commit 186acfbaf7 ("tests/qtest: Depend on dbus_display1_dep") no longer relevant, as dbus-display1.c will be recompiled. Alternatively, we could always build with pic: true (or pic: enable_modules), but that's not ideal either. -- Marc-André Lureau

Re: [PATCH] input-linux: Add option to not grab a device upon guest startup

2024-03-15 Thread Marc-André Lureau
Hi Justinien On Fri, Mar 15, 2024 at 6:37 AM Justinien Bouron wrote: > > Just a ping to make sure this patch hasn't been lost in the noise. > Any chance to get this merged? Should I send a v2 with a revised commit > message? > It's too late for 9.0. Please send a v2 with updated commit

Re: [PATCH v4 06/24] chardev: set record/replay on the base device of a muxed device

2024-03-12 Thread Marc-André Lureau
U_CHAR_FEATURE_REPLAY); > -} > -if (qemu_chr_replay(chr) && CHARDEV_GET_CLASS(chr)->chr_ioctl) { > -error_report("Replay: ioctl is not supported " > - "for serial devices yet"); > -} > -replay_register_char_driver(chr); > -} > -return chr; > +return __qemu_chr_new(label, filename, permit_mux_mon, context, true); > } > > Chardev *qemu_chr_new(const char *label, const char *filename, > -- > 2.42.0 > > It's probably too late for 9.0, splitting the patch and preliminary cleanup should really help reviewing the change and pointing out the behaviour differences. thanks -- Marc-André Lureau

Re: [PATCH v2] virtio-gpu: first surface update with blob scanout after resumed

2024-03-12 Thread Marc-André Lureau
't fix it, can you apply your solution on top of it? thanks > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > hw/display/virtio-gpu.c | 21 ++--- > 1 file changed, 14 insertions(+), 7 deletions(-) > > diff --git a/h

Re: [PATCH v3] ui/gtk: flush display pipeline before saving vmstate when blob=true

2024-03-12 Thread Marc-André Lureau
d before flushing > the pipeline > > v3: Prevent redundant call of gd_hw_gl_flushed by checking dmabuf > and fence_fd >= 0 in it (e.g. during and after eglClientWaitSync > in gd_change_runstate). > > Destroy sync object later in gd_hw_fl_flushed > > Cc:

Re: [PATCH 0/3] ui/gtk: introducing vc->visible

2024-03-07 Thread Marc-André Lureau
Hi On Fri, Mar 8, 2024 at 4:59 AM Kim, Dongwon wrote: > > Hi Marc-André, > > > -Original Message- > > From: Marc-André Lureau > > Sent: Tuesday, March 5, 2024 4:18 AM > > To: Kim, Dongwon ; P. Berrange, Daniel > > > > Cc: qemu-devel@n

Re: [PATCH 2/2] virtio-gpu: first surface update with blob scanout after resumed

2024-03-06 Thread Marc-André Lureau
Hi Dongwon Kim On Wed, Mar 6, 2024 at 2:24 AM wrote: > > From: Dongwon Kim > > The guest surface needs to be updated with a blob scanout after resumed > from saved vm state if blob is enabled. > > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongw

Re: [PATCH] char: Slightly better error reporting when chardev is in use

2024-03-06 Thread Marc-André Lureau
> > qemu-system-x86_64: -mon chardev=chr0: chardev 'chr0' is already in use > > Signed-off-by: Markus Armbruster lgtm Reviewed-by: Marc-André Lureau > --- > chardev/char-fe.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/char

Re: [PATCH 3/3] virtio-gpu: first surface update with blob scanout after resumed

2024-03-05 Thread Marc-André Lureau
Hi Dongwon Kim On Thu, Dec 14, 2023 at 8:26 AM Dongwon Kim wrote: > > The guest surface needs to be updated with a blob scanout after resumed > from saved vm state if blob is enabled. > > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim Can you re

Re: [PATCH 0/3] ui/gtk: introducing vc->visible

2024-03-05 Thread Marc-André Lureau
esponsible) Daniel, could you have a look too? thanks On Fri, Mar 1, 2024 at 4:05 AM Kim, Dongwon wrote: > > Hi Marc-André Lureau, > > Just a reminder.. I need your help reviewing this patch series. Please take a > look at my messages at > https://lists.gnu.org/archive/html/qemu

Re: [PATCH] chardev/char-socket: Fix TLS io channels sending too much data to the backend

2024-02-29 Thread Marc-André Lureau
/channel-tls: fix handling of bigger read buffers") > Buglink: https://issues.redhat.com/browse/RHEL-24614 > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Thomas Huth Reviewed-by: Marc-André Lureau > --- > Sorry if you've got this mail twice - I forgot to CC: qemu-devel

Re: [PATCH] virtio-gpu: Fix HW cursor visibility

2024-02-28 Thread Marc-André Lureau
ly set a "transparent" cursor, which we don't detect. Maybe we should also have some check for this case to implement that "show-cursor" behaviour in that case too. > parameter, thereby hiding the cursor. Once Windows VM switches back to > the HW cursor, then IDD would again prov

Re: [PATCH 1/7] qga/commands-posix: return fsinfo values directly as reported by statvfs

2024-02-27 Thread Marc-André Lureau
Hi On Tue, Feb 27, 2024 at 4:38 PM Andrey Drobyshev wrote: > > > > On 2/26/24 20:50, Konstantin Kostiuk wrote: > > > > Best Regards, > > Konstantin Kostiuk. > > > > > > On Mon, Feb 26, 2024 at 7:02 PM Andrey Drobyshev > > mailto:andrey.drobys...@virtuozzo.com>> > > wrote: > > > > Since the

Re: [PATCH] tests/unit/test-util-sockets: Remove temporary file after test

2024-02-26 Thread Marc-André Lureau
On Mon, Feb 26, 2024 at 12:28 PM Thomas Huth wrote: > > test-util-sockets leaves the temporary socket files around in the > temporary files folder. Let's better remove them at the end of the > testing. > > Signed-off-by: Thomas Huth Reviewed-by: Marc-André Lureau > --- &g

Re: [PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI

2024-02-19 Thread Marc-André Lureau
Hi On Mon, Feb 19, 2024 at 4:39 PM Thomas Huth wrote: > > When compiling with "configure --without-default-devices", the > dbus-display-test fails since it implicitly assumes that the > machine comes with the standard VGA card. Thus add a check to > meson.build to disable the test if the VGA

Re: [PATCH v2 0/4] meson: Fixes for dbus modules

2024-02-14 Thread Marc-André Lureau
| 2 +- > ui/meson.build| 18 -- > 9 files changed, 28 insertions(+), 23 deletions(-) > --- > base-commit: 4705fc0c8511d073bee4751c3c974aab2b10a970 > change-id: 20231215-dbus-86876ecb7b09 > > Best regards, > -- > Akihiko Odaki > > -- Marc-André Lureau

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

2024-02-14 Thread Marc-André Lureau
Hi On Tue, Feb 6, 2024 at 6:06 PM wrote: > > 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

Re: [PATCH v6] util: Move dbus_display1 to util

2024-02-13 Thread Marc-André Lureau
ly nice for things that are really common, but in this case I don't think it's a win. > > Signed-off-by: Akihiko Odaki > --- > I found it was failing to build dbus modules when --enable-dbus so here > are fixes. > --- > Changes in v6: > - Dropped patch "aud

Re: [PATCH 1/4] chardev/parallel: Don't close stdin on inappropriate device

2024-02-13 Thread Marc-André Lureau
Hi On Tue, Feb 13, 2024 at 5:58 PM Markus Armbruster wrote: > > Markus Armbruster writes: > > > The __linux__ version of qemu_chr_open_pp_fd() tries to claim the > > parport device with a PPCLAIM ioctl(). On success, it stores the file > > descriptor in the chardev object, and returns success.

Re: [PATCH] ui/console: Fix console resize with placeholder surface

2024-02-08 Thread Marc-André Lureau
p; !is_buffer_shared(surface) && > !is_placeholder(surface))) && > qemu_console_get_width(s, -1) == width && > qemu_console_get_height(s, -1) == height) { > return; > -- > 2.38.1.windows.1 > > Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: ui/dbus-display1.[ch] are not properly listed in dependencies

2024-02-06 Thread Marc-André Lureau
Hi Michael On Sat, Feb 3, 2024 at 5:41 PM Michael Tokarev wrote: > > Doing a build of just a single target with --enable modules results in build > error: > > > rm -rf b; cd b > ../configure --enable-modules --target-list=x86_64-softmmu > ninja qemu-system-x86_64 > >In file included

Re: [PATCH 0/4] char: Minor fixes, and a tighter QAPI schema

2024-02-03 Thread Marc-André Lureau
l > qapi/char: Deprecate backend type "memory" Reviewed-by: Marc-André Lureau > > docs/about/deprecated.rst | 8 > qapi/char.json| 28 +--- > include/qemu/osdep.h | 9 - > chardev/char-parallel.c |

Re: [PATCH 1/3] ui/gtk: skip drawing guest scanout when associated VC is invisible

2024-01-31 Thread Marc-André Lureau
age(nb, page); > > > gtk_widget_grab_focus(vc->focus); > > > +vc->gfx.visible = true; > > > } > > > } > > > > > > @@ -1350,6 +1355,7 @@ static gboolean gd_tab_window_close(GtkWidget > > *widget, GdkEvent *event, > > > VirtualConsole *vc = opaque; > > > GtkDisplayState *s = vc->s; > > > > > > +vc->gfx.visible = false; > > > gtk_widget_set_sensitive(vc->menu_item, true); > > > gd_widget_reparent(vc->window, s->notebook, vc->tab_item); > > > gtk_notebook_set_tab_label_text(GTK_NOTEBOOK(s->notebook), > > > @@ -1423,6 +1429,7 @@ static void gd_menu_untabify(GtkMenuItem *item, > > void *opaque) > > > gd_update_geometry_hints(vc); > > > gd_update_caption(s); > > > } > > > +vc->gfx.visible = true; > > > } > > > > > > static void gd_menu_show_menubar(GtkMenuItem *item, void *opaque) > > @@ > > > -2471,6 +2478,7 @@ static void gtk_display_init(DisplayState *ds, > > > DisplayOptions *opts) #ifdef CONFIG_GTK_CLIPBOARD > > > gd_clipboard_init(s); > > > #endif /* CONFIG_GTK_CLIPBOARD */ > > > +vc->gfx.visible = true; > > > } > > > > > > static void early_gtk_display_init(DisplayOptions *opts) > > > -- > > > 2.34.1 > > > > > > > > > > > > -- > > Marc-André Lureau -- Marc-André Lureau

Re: [PATCH 2/3] ui/gtk: set the ui size to 0 when invisible

2024-01-30 Thread Marc-André Lureau
ling the monitor here? Is it for performance reasons? > > Cc: Marc-André Lureau > Cc: Gerd Hoffmann > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > ui/gtk.c | 15 ++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/ui/gtk.c b/ui/gtk.c >

Re: [PATCH 1/3] ui/gtk: skip drawing guest scanout when associated VC is invisible

2024-01-30 Thread Marc-André Lureau
is invisible, drawing guest frames > should be skipped as it will never be completed and it would potentially > lock up the guest display especially when blob scanout is used. Can't it skip drawing when the widget is not visible instead? https://docs.gtk.org/gtk3/method.Widget.is_visible.htm

Re: [PATCH v2 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Marc-André Lureau
Hi On Tue, Jan 30, 2024 at 5:01 PM Manos Pitsidianakis wrote: > > On Tue, 30 Jan 2024 at 14:50, Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Jan 29, 2024 at 7:46 PM Manos Pitsidianakis > > wrote: > > > > > &g

Re: [PATCH v2 3/3] virtio-gpu-rutabaga.c: override resource_destroy method

2024-01-30 Thread Marc-André Lureau
_ctrl; > vgc->process_cmd = virtio_gpu_rutabaga_process_cmd; > vgc->update_cursor_data = virtio_gpu_rutabaga_update_cursor; > - > +vgc->resource_destroy = virtio_gpu_rutabaga_resource_unref; > vdc->realize = virtio_gpu_rutabaga_realize; > device_class_set_props(dc, virtio_gpu_rutabaga_properties); > } > -- > γαῖα πυρί μιχθήτω > -- Marc-André Lureau

Re: [PATCH v2 2/3] virtio-gpu.c: add resource_destroy class method

2024-01-30 Thread Marc-André Lureau
; g->parent_obj.conf.max_outputs; i++) { > @@ -1632,6 +1650,7 @@ static void virtio_gpu_class_init(ObjectClass *klass, > void *data) > vgc->handle_ctrl = virtio_gpu_handle_ctrl; > vgc->process_cmd = virtio_gpu_simple_process_cmd; > vgc->update_cursor_data = virtio_gpu_update_cursor_data; > +vgc->resource_destroy = virtio_gpu_resource_destroy; > vgbc->gl_flushed = virtio_gpu_handle_gl_flushed; > > vdc->realize = virtio_gpu_device_realize; > -- > γαῖα πυρί μιχθήτω > otherwise, Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [PATCH v1 2/3] virtio-gpu.c: add resource_destroy class method

2024-01-29 Thread Marc-André Lureau
w/virtio/virtio-gpu.h > > > b/include/hw/virtio/virtio-gpu.h > > > index 584ba2ed73..5683354236 100644 > > > --- a/include/hw/virtio/virtio-gpu.h > > > +++ b/include/hw/virtio/virtio-gpu.h > > > @@ -219,6 +219,8 @@ struct VirtIOGPUClass { > > > void (*update_cursor_data)(VirtIOGPU *g, > > > struct virtio_gpu_scanout *s, > > > uint32_t resource_id); > > > +int32_t (*resource_destroy)(VirtIOGPU *g, > > > +struct virtio_gpu_simple_resource *res); > > > }; > > > > > > struct VirtIOGPUGL { > > > thanks -- Marc-André Lureau

Re: [PATCH v1 1/3] hw/display/virtio-gpu.c: use reset_bh class method

2024-01-29 Thread Marc-André Lureau
> While no devices override reset_bh at the moment, a device reset might > require special logic for implementations in the future. > > Signed-off-by: Manos Pitsidianakis Reviewed-by: Marc-André Lureau > --- > hw/display/virtio-gpu.c | 2 +- > 1 file changed, 1 insertio

Re: [PATCH v1] virtio-gpu: Correct virgl_renderer_resource_get_info() error check

2024-01-28 Thread Marc-André Lureau
On Sun, Jan 28, 2024 at 2:10 AM Dmitry Osipenko wrote: > > virgl_renderer_resource_get_info() returns errno and not -1 on error. > Correct the return-value check. > > Signed-off-by: Dmitry Osipenko Reviewed-by: Marc-André Lureau Can you also correct the code in vhost-user-gpu

Re: [PATCH v3 1/2] ui/clipboard: mark type as not available when there is no data

2024-01-24 Thread Marc-André Lureau
at the type is not available. > > While at it, switch to g_memdup2(), because g_memdup() is deprecated. > > Cc: qemu-sta...@nongnu.org > Fixes: CVE-2023-6683 > Reported-by: Markus Frank > Suggested-by: Marc-André Lureau > Signed-off-by: Fiona Ebner > --- > > C

Re: [PATCH v3 2/2] ui/clipboard: add asserts for update and request

2024-01-24 Thread Marc-André Lureau
On Wed, Jan 24, 2024 at 2:59 PM Fiona Ebner wrote: > > 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-And

Re: [PATCH v1 1/7] ui/spice: Add an option for users to provide a preferred codec

2024-01-22 Thread Marc-André Lureau
Hi On Sat, Jan 20, 2024 at 4:54 AM Vivek Kasireddy wrote: > > Giving users an option to choose a particular codec will enable > them to make an appropriate decision based on their hardware and > use-case. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Frediano Z

Re: [PATCH v1 2/7] ui/spice: Enable gl=on option for non-local or remote clients

2024-01-22 Thread Marc-André Lureau
ch would encode and send the data > associated with the fd to a client that could be located on > a different machine. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off-by: Vivek Kasireddy > --- > includ

Re: [PATCH v1 3/7] ui/spice: Submit the gl_draw requests at 60 FPS for remote clients

2024-01-22 Thread Marc-André Lureau
o() though. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off-by: Vivek Kasireddy > --- > ui/spice-display.c | 38 -- > 1 file changed, 28 insertions(+), 10 deletions(-) > >

Re: [PATCH v1 7/7] ui/spice: Create another texture with linear layout when gl=on is enabled

2024-01-22 Thread Marc-André Lureau
e a memory object by importing the dmabuf > fd created earlier and finally create a linear texture by using the > memory object as the texture storage mechanism. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 3:56 PM Fiona Ebner wrote: > > Am 17.01.24 um 12:33 schrieb Marc-André Lureau: > > Hi > > > > On Wed, Jan 17, 2024 at 3:30 PM Fiona Ebner wrote: > >> > >> Am 17.01.24 um 12:11 schrieb Marc-André Lureau: > >>> Hi &

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 3:30 PM Fiona Ebner wrote: > > Am 17.01.24 um 12:11 schrieb Marc-André Lureau: > > Hi > > > > On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner wrote: > >> > >> +for (type = 0; type < QEMU_CLIPBOARD_TYPE__COUNT && !

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

2024-01-17 Thread Marc-André Lureau
; +return -EINVAL; > > +} > > "qemu_create_displaysurface_pixman() never returns NULL." ;-) Right, I'll update the first patch. Other comments about this patch? thanks -- Marc-André Lureau

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
still happens. > > Fix the issue by disallowing clipboard update if both, data is missing > and the clipboard owner's 'request' callback is not set. > > Add an assert that the clipboard owner's 'request' callback is set in > qemu_clipboard_request() to have a clean error/abort

Re: [PATCH v2] coroutine-ucontext: Save fake stack for pooled coroutine

2024-01-16 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 11:26 AM Marc-André Lureau wrote: > > Hi > > On Wed, Jan 17, 2024 at 11:06 AM Akihiko Odaki > wrote: > > > > Coroutine may be pooled even after COROUTINE_TERMINATE if > > CONFIG_COROUTINE_POOL is enabled and fake stack should be

Re: [PATCH v2] coroutine-ucontext: Save fake stack for pooled coroutine

2024-01-16 Thread Marc-André Lureau
tack corruption without fake stack being saved. > > Signed-off-by: Akihiko Odaki > --- > Changes in v2: > - Added missing set_current() (Marc-André Lureau) > - Added G_STATIC_ASSERT(!IS_ENABLED(CONFIG_TSAN)) (Marc-André Lureau) > - Renamed terminate() to terminate_asan() for

Re: [PATCH] coroutine-ucontext: Save fake stack for pooled coroutine

2024-01-16 Thread Marc-André Lureau
t.c | 21 +++-- > > 1 file changed, 19 insertions(+), 2 deletions(-) > > Adding Marc-André Lureau and Lingfeng Yang, who authored the code in > question. Side note: I am surprised that commit 0aebab04b9 "configure: add --enable-tsan flag + fiber annotations" cha

Re: [PATCH] ui/clipboard: avoid crash upon request when clipboard peer is not initialized

2024-01-15 Thread Marc-André Lureau
Hi On Mon, Jan 15, 2024 at 3:48 PM Fiona Ebner wrote: > > Am 15.01.24 um 12:33 schrieb Marc-André Lureau: > > Hi > > > > On Mon, Jan 15, 2024 at 3:26 PM Fiona Ebner wrote: > >> > >> Am 15.01.24 um 12:15 schrieb Marc-André Lureau: > >>> Hi &

  1   2   3   4   5   6   7   8   9   10   >