[PATCH 06/67] ui/console: console_select() regardless of have_gfx

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Even if we don't have a gfx listener, we should call displaychangelistener_display_console() which handle that case correctly. Signed-off-by: Marc-André Lureau --- ui/console.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/console.c b

[PATCH 14/67] ui/vc: fold text_update_xy()

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ui/console.c b/ui/console.c index 9d8406f2a2..e96f154cc0 100644 --- a/ui/console.c +++ b/ui/console.c @@ -425,14 +425,6 @@ static void text

[PATCH 18/67] ui/console: change new_console() to use object initialization

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Object construction should be done in respective object instance and class handlers. Introduce qemu_console_register() to split out the registration logic. Signed-off-by: Marc-André Lureau --- ui/console.c | 93 +++- 1 fi

[PATCH 20/67] ui/console: instantiate a specific console type

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau This will allow to move code/data to the specific console types. Replace console_type_t with object type check. QemuConsole can be abstract. Signed-off-by: Marc-André Lureau --- ui/console.c | 47 +++ 1 file changed, 19 inse

[PATCH 16/67] ui/vc: move VCCharDev specific fields out of QemuConsole

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 147 +-- 1 file changed, 73 insertions(+), 74 deletions(-) diff --git a/ui/console.c b/ui/console.c index 8fe39aa5e3..b9b545fa3d 100644 --- a/ui/console.c +++ b/ui/consol

[PATCH 12/67] ui/vc: move VCChardev declaration at the top

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau To allow easier refactoring in following patches. Signed-off-by: Marc-André Lureau --- ui/console.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/console.c b/ui/console.c index 2b8022dfbe..ad6fbb1d0f 100644 --- a/ui/console.c +++ b/

[PATCH 13/67] ui/vc: replace variable with static text attributes default

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ui/console.c b/ui/console.c index ad6fbb1d0f..9d8406f2a2 100644 --- a/ui/console.c +++ b/ui/console.c @@ -52,6 +52,11 @@

[PATCH 21/67] ui/console: register the console from qemu_console_init()

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index dd8e8db525..02a24eaf5d 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1366,6 +1366,7 @@ qemu_console_init(Object *o

[PATCH 17/67] ui/console: use OBJECT_DEFINE_TYPE for QemuConsole

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau The following patch will move some object initialization to the corresponding handlers. Signed-off-by: Marc-André Lureau --- ui/console.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/ui/console.c b/ui/console.c in

[PATCH 11/67] ui/vc: VC always has a DisplayState now

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/console.c | 4 1 file changed, 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index 8c4626f255..2b8022dfbe 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1067,10 +1067,6 @@ static int vc_chr_write(Chardev *chr, con

[PATCH 07/67] ui/console: call dpy_gfx_update() regardless of have_gfx

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau The function will handle the case when no listeners are gfx, without extra meaningful cost. This allows to get rid of DisplayState dependency in VC implementation. Signed-off-by: Marc-André Lureau --- ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 02/67] ui: remove qemu_pixman_linebuf_copy()

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Since commit 43c7d8bd449 ("console: add qemu_pixman_linebuf_copy"), it seems it was never used. Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 2 -- ui/qemu-pixman.c | 8 2 files changed, 10 deletions(-) diff --git a/include/ui/qemu-pi

[PATCH 08/67] ui/console: drop have_gfx

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau All usages have been removed. Signed-off-by: Marc-André Lureau --- ui/console.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/ui/console.c b/ui/console.c index 2bc4c153de..fc1836782d 100644 --- a/ui/console.c +++ b/ui/console.c @@ -132,7 +132,6 @@ struct Dis

[PATCH 05/67] ui/vc: drop have_text

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau If there are no "text" listener, the callback will simply be ignored. The rest of text handling can be done cheaply. This allows to remove some dependency on DisplayState from VC implementation. Signed-off-by: Marc-André Lureau --- ui/console.c | 42 +--

[PATCH 04/67] ui/vc: replace vc_chr_write() with generic qemu_chr_write()

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau We shouldn't call the callback directly, but use the chardev API, unless there is a clear reason. Signed-off-by: Marc-André Lureau --- ui/console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/console.c b/ui/console.c index 9c17024dbc..a4

[PATCH 10/67] ui/console: new_console() cannot fail

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau There is no code path that could allow a NULL return there. Signed-off-by: Marc-André Lureau --- ui/console.c | 5 - 1 file changed, 5 deletions(-) diff --git a/ui/console.c b/ui/console.c index ba79c735b7..8c4626f255 100644 --- a/ui/console.c +++ b/ui/console.c @@

[PATCH 01/67] ui: remove qemu_pixman_color() helper

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Usage removed in commit e27bd65a72d ("console: switch color_table_rgb to pixman_color_t") Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 1 - ui/qemu-pixman.c | 11 --- 2 files changed, 12 deletions(-) diff --git a/include/ui/qemu-pix

[PATCH 03/67] ui/qmp: move screendump to ui-qmp-cmds.c

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau console.c unit is over-crowded. This code is specific to the handling of the QMP screendump command, so move it in ui-qmp-cmds. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 1 + ui/console.c | 212 --- ui/

[PATCH 00/67] Make pixman an optional dependency

2023-08-30 Thread marcandre . lureau
From: Marc-André Lureau Hi, QEMU system emulators can be made to compile and work without pixman. Given how pervasively pixman types and API is used in all the code base, it was a bit difficult to figure out how to cut the dependency. I decided that it was important to keep VGA and graphics de

[PATCH] qxl: don't assert() if device isn't yet initialized

2023-08-14 Thread marcandre . lureau
From: Marc-André Lureau If the PCI BAR isn't yet mapped or was unmapped, QXL_IO_SET_MODE will assert(). Instead, report a guest bug and keep going. This can be reproduced with: cat << EOF | ./qemu-system-x86_64 -vga qxl -m 2048 -nodefaults -qtest stdio outl 0xcf8 0x8000101c outl 0xcfc 0xc000 ou

[PULL 6/6] ui/gtk: set scanout mode in gd_egl/gd_gl_area_scanout_texture

2023-08-07 Thread marcandre . lureau
From: Dongwon Kim Fixing a regression (black screen) caused by a commit 92b58156e7 ("ui/gtk: set scanout-mode right before scheduling draw"). The commit 92b58156e7 was made with an assumption that the scanout mode needs to be set only if the guest scanout is a dmabuf but there are cases (e.g. vi

[PULL 0/6] Fixes patches

2023-08-07 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9400601a689a128c25fa9c21e932562e0eeb7a26: Merge tag 'pull-tcg-20230806-3' of https://gitlab.com/rth7680/qemu into staging (2023-08-06 16:47:48 -0700) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu

[PULL 5/6] hw/i386/vmmouse:add relative packet flag for button status

2023-08-07 Thread marcandre . lureau
From: Zongmin Zhou The buttons value use macros instead of direct numbers. If request relative mode, have to add this for guest vmmouse driver to judge this is a relative packet. otherwise,vmmouse driver will not match the condition 'status & VMMOUSE_RELATIVE_PACKET', and can't report events on

[PULL 3/6] virtio-gpu: reset gfx resources in main thread

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

[PULL 2/6] virtio-gpu: free BHs, by implementing unrealize

2023-08-07 Thread marcandre . lureau
From: Marc-André Lureau Acked-by: Dongwon Kim Signed-off-by: Marc-André Lureau Message-Id: <20230726173929.690601-2-marcandre.lur...@redhat.com> --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu.c| 10 ++ 3 files changed, 1

[PULL 4/6] dump: kdump-zlib data pages not dumped with pvtime/aarch64

2023-08-07 Thread marcandre . lureau
From: Dongli Zhang The kdump-zlib data pages are not dumped from aarch64 host when the 'pvtime' is involved, that is, when the block->target_end is not aligned to page_size. In the below example, it is expected to dump two blocks. (qemu) info mtree -f ... ... 090a-090a0fff

[PULL 1/6] chardev: report the handshake error

2023-08-07 Thread marcandre . lureau
From: Marc-André Lureau This can help to debug connection issues. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2196182 Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230510072531.3937189-1-marcandre.lur...@redhat.com> --- chardev/char-socket.c | 12

[PATCH 2/2] vmmouse: use explicit code

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

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

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

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

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

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

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

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

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

[PATCH] ui/dbus: fix clang compilation issue

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

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

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

[PULL 09/19] tests/lcitool: add pipewire

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230506163735.3481387-3-marcandre.lur...@redhat.com> --- tests/docker/dockerfiles/alpine.docker| 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/do

[PULL 05/19] virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties

2023-07-17 Thread marcandre . lureau
From: Dongwon Kim Replace 'width' and 'height' in QemuDmaBuf with 'backing_widht' and 'backing_height' as these commonly indicate the size of the whole surface (e.g. guest's Xorg extended display). Then use 'width' and 'height' for sub region in there (e.g. guest's scanouts). Cc: Gerd Hoffmann

[PULL 15/19] audio/pw: factorize some common code

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-9-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 85 - 1 file changed, 34 insertions(+), 51 deletions(-) diff --git a/au

[PULL 13/19] audio/pw: trace during init before calling pipewire API

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-7-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audio/pwaudi

[PULL 18/19] audio/pw: remove wrong comment

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau The stream is actually created connected. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-12-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/audio/pwaudio.c b/audio/pwa

[PULL 04/19] virtio-gpu: replace the surface with null surface when resetting

2023-07-17 Thread marcandre . lureau
From: Dongwon Kim The primary guest scanout shows the booting screen right after reboot but additional guest displays (i.e. max_ouptuts > 1) will keep displaying the old frames until the guest virtio gpu driver gets initialized, which could cause some confusion. A better way is to to replace the

[PULL 12/19] audio/pw: needless check for NULL

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau g_clear_pointer() already checks for NULL. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-6-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/au

[PULL 08/19] libvirt-ci: update submodule to cover pipewire

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20230506163735.3481387-2-marcandre.lur...@redhat.com> --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index b0f44f929a..9bff

[PULL 19/19] audio/pw: improve channel position code

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Follow PulseAudio backend comment and code, and only implement the channels QEMU actually supports at this point, and add the same comment about limits and future mappings. Simplify a bit the code. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id:

[PULL 11/19] audio/pw: drop needless case statement

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-5-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 9eb69bfd18..51cfc0b

[PULL 17/19] audio/pw: simplify error reporting in stream creation

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau create_stream() now reports on all error paths. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-11-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff

[PULL 16/19] audio/pw: add more error reporting

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-10-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 70f0c46

[PULL 10/19] audio/pw: Pipewire->PipeWire case fix for user-visible text

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau "PipeWire" is the correct case. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-4-marcandre.lur...@redhat.com> --- meson.build | 2 +- qapi/audio.json

[PULL 03/19] ui/gtk: Make sure the right EGL context is currently bound

2023-07-17 Thread marcandre . lureau
From: Dongwon Kim Observed a wrong context is bound when changing the scanout mode. To prevent problem, it is needed to make sure to bind the right context in gtk_egl_set_scanout_mode/gtk_gl_area_set_scanout_mode as well as unbind one in the end of gd_egl_update/gd_gl_area_update. Cc: Gerd Hoffm

[PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw

2023-07-17 Thread marcandre . lureau
From: Dongwon Kim Setting scanout mode is better to be done very last minute right because the mode can be reset anytime after it is set in dpy_gl_scanout_texture by any asynchronouse dpy_refresh call, which eventually cancels drawing of the guest scanout texture. Cc: Gerd Hoffmann Cc: Marc-And

[PULL 14/19] audio/pw: add more details on error

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau PipeWire uses errno to report error details. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-8-marcandre.lur...@redhat.com> --- audio/pwaudio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/a

[PULL 01/19] virtio-gpu: fix potential divide-by-zero regression

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau Commit 9462ff4695aa0 ("virtio-gpu/win32: allocate shareable 2d resources/images") introduces a division, which can lead to crashes when "height" is 0. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1744 Reviewed-by: Alexander Bulekov Signed-off-by: Marc-André Lurea

[PULL 02/19] ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255)

2023-07-17 Thread marcandre . lureau
From: Mauro Matteo Cascella A wrong exit condition may lead to an infinite loop when inflating a valid zlib buffer containing some extra bytes in the `inflate_buffer` function. The bug only occurs post-authentication. Return the buffer immediately if the end of the compressed data has been reache

[PULL 07/19] ui/gtk: skip refresh if new dmabuf has been submitted

2023-07-17 Thread marcandre . lureau
From: Dongwon Kim Skip refresh if a new dmabuf (guest scanout frame) has already been submitted and ready to be drawn because the scanout will be updated with new frame anyway. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Acked-by: Marc-André Lureau

[PULL 00/19] UI & audio patches

2023-07-17 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit ed8ad9728a9c0eec34db9dff61dfa2f1dd625637: Merge tag 'pull-tpm-2023-07-14-1' of https://github.com/stefanberger/qemu-tpm into staging (2023-07-15 14:54:04 +0100) are available in the Git repository at: https://gitlab.com/marcandre.

[PATCH] virtio-gpu: fix potential divide-by-zero regression

2023-07-04 Thread marcandre . lureau
From: Marc-André Lureau Commit 9462ff4695aa0 ("virtio-gpu/win32: allocate shareable 2d resources/images") introduces a division, which can lead to crashes when "height" is 0. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1744 Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c

[PATCH] audio: dbus requires pixman

2023-06-30 Thread marcandre . lureau
From: Marc-André Lureau Commit commit 6cc5a615 ("ui/dbus: win32 support") has broken audio/dbus compilation when pixman is not included. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1739 Signed-off-by: Marc-André Lureau --- audio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 d

[PULL 33/33] ui/dbus: use shared D3D11 Texture2D when possible

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau When the client implements "org.qemu.Display1.Listener.Win32.D3d11" and we are running on ANGLE/win32, share the scanout texture with the peer process, and draw with ScanoutTexture2d/UpdateTexture2d methods. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.67

[PULL 22/33] virtio-gpu/win32: allocate shareable 2d resources/images

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Allocate pixman bits for scanouts with qemu_win32_map_alloc() so we can set a shareable handle on the associated display surface. Note: when bits are provided to pixman_image_create_bits(), you must also give the rowstride (the argument is ignored when bits is NULL) Sign

[PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf

2023-06-27 Thread marcandre . lureau
From: Dongwon Kim Respond with VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY if it fails to create an udmabuf for the blob resource. v2: consolidated return statments and removed an unnecessary style change Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Reviewed-

[PULL 17/33] ui/dbus: win32 support

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau D-Bus doesn't support fd-passing on Windows (AF_UNIX doesn't have SCM_RIGHTS yet, but there are other means to share objects. I have proposed various solutions upstream, but none seem fitting enough atm). To make the "-display dbus" work on Windows, implement an alternati

[PULL 28/33] ui/dbus: add some GL traces

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-17-marcandre.lur...@redhat.com> --- ui/dbus-listener.c | 6 ++ ui/trace-events| 3 +++ 2 files changed, 9 insertions(+) diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index e92eff66e3..860

[PULL 12/33] ui/gtk: making dmabuf NULL when it's released.

2023-06-27 Thread marcandre . lureau
From: Dongwon Kim Set vc->gfx.guest_fb.dmabuf to NULL to prevent any further access to it after the dmabuf is released. v2: move declaration of vc inside ifdef Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Reviewed-by: Marc-André Lureau Message-ID:

[PULL 06/33] ui/touch: Move event handling to a common helper

2023-06-27 Thread marcandre . lureau
From: Bilal Elmoussaoui To share code between the GTK and DBus UI bakcends see the next commit for details Signed-off-by: Bilal Elmoussaoui Reviewed-by: Marc-André Lureau Message-Id: <20230619095337.9899-2-belmo...@redhat.com> --- include/ui/console.h | 15 ++ ui/console.c | 6

[PULL 13/33] ui/egl: export qemu_egl_get_error_string()

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau It will be used from other units. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-2-marcandre.lur...@redhat.com> --- include/ui/egl-helpers.h | 2 ++ ui/egl-helpers.c | 12 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff

[PULL 19/33] tests: make dbus-display-test work on win32

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Thomas Huth Message-Id: <20230606115658.677673-8-marcandre.lur...@redhat.com> --- tests/qtest/dbus-display-test.c | 43 ++--- tests/qtest/meson.build | 2 +- 2 files changed, 41 insertions(+

[PULL 25/33] ui/egl: default to GLES on windows

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Windows GL drivers are notoriously not very good. Otoh, ANGLE provides rock solid GLES implementation on top of direct3d. We should recommend it and default to ES when using EGL (users can easily override this if necessary) Signed-off-by: Marc-André Lureau Message-Id: <2

[PULL 24/33] ui: add egl-headless support on win32

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Make GBM optional for EGL code, and enable the build for win32. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-13-marcandre.lur...@redhat.com> --- qapi/ui.json | 5 ++--- include/ui/egl-helpers.h | 7 ++- ui/egl-headless.c|

[PULL 21/33] console/win32: allocate shareable display surface

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Introduce qemu_win32_map_alloc() and qemu_win32_map_free() to allocate shared memory mapping. The handle can be used to share the mapping with another process. Teach qemu_create_displaysurface() to allocate shared memory. Following patches will introduce other places for

[PULL 23/33] ui/dbus: use shared memory when possible on win32

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau When the display surface has an associated HANDLE, we can duplicate it to the client process and let it map the memory to avoid expensive copies. Introduce two new win32-specific methods ScanoutMap and UpdateMap. The first is used to inform the listener about the a shared

[PULL 31/33] ui: add optional d3d texture pointer to scanout texture

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau The following patch will get the underlying D3D11 Texture2D from the virgl renderer scanout. Pass it along to the texture scanout callbacks as a priliminary step, to simplify review. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-20-marcandre.lur...@

[PULL 14/33] ui/egl: fix make_context_current() callback return value

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau eglMakeCurrent() returns 1/EGL_TRUE on success. This is not what the callback expects, where 0 indicates success. While at it, print the EGL error to ease debugging. As with virgl_renderer_callbacks, the return value is now checked since version >= 4: https://gitlab.free

[PULL 26/33] ui: add egl_fb_read_rect()

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Similar to egl_fb_read(), same limitations, but with extra arguments to read a subset of the framebuffer. Used in following commits. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-15-marcandre.lur...@redhat.com> --- include/ui/egl-helpers.h | 1 +

[PULL 03/33] ui/sdl2: OpenGL window context

2023-06-27 Thread marcandre . lureau
From: Antonio Caggiano When OpenGL is enabled, create only the OpenGL context, ignoring the SDL renderer as it is unused anyway. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Message-Id: <20230612091959.2983-1-quic_acagg...@quicinc.com> --- ui/sdl2.c | 18 +++---

[PULL 18/33] qtest: add qtest_pid()

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Used in the following test on win32, to share sockets with the QEMU process. Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230606115658.677673-7-marcandre.lur...@redhat.com> --- tests/qtest/libqtest.h | 9 + tests/qtest/libqtest.c | 5

[PULL 09/33] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1

2023-06-27 Thread marcandre . lureau
From: Dongwon Kim There were often cases where a scanout blob sometimes has just 1 entry that is linked to many pages in it. So just checking whether iov_cnt is 1 is not enough for screening small, non-scanout blobs. Therefore adding iov_len check as well to make sure it creates an udmabuf only f

[PULL 29/33] virtio-gpu-virgl: teach it to get the QEMU EGL display

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau virgl offers a few features that require to have access to the underlying EGLDisplay. This is the case for the D3D texture sharing support. The API callback is merged for virgl 1.0: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1113 Signed-off-by: M

[PULL 07/33] ui/dbus: Expose a touch device interface

2023-06-27 Thread marcandre . lureau
From: Bilal Elmoussaoui So that clients making use of the DBus backend could send touch events through the new org.qemu.Display1.Touch interface Signed-off-by: Bilal Elmoussaoui Reviewed-by: Marc-André Lureau Message-Id: <20230619095337.9899-3-belmo...@redhat.com> --- ui/dbus-console.c| 5

[PULL 32/33] virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Enable D3D texture sharing when possible, and pass it to the texture display callbacks. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-21-marcandre.lur...@redhat.com> --- meson.build | 6 ++ hw/display/virtio-gpu-virgl.c | 24

[PULL 02/33] egl: no need to lookup EGL functions manually

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau libepoxy handles loading the function pointer and dispatching the call, so you don't have to worry about it. Signed-off-by: Marc-André Lureau Message-Id: <20230515132455.1025608-1-marcandre.lur...@redhat.com> --- ui/egl-helpers.c | 6 ++ 1 file changed, 2 insertions

[PULL 04/33] virtio-gpu: Optimize 2D resource data transfer

2023-06-27 Thread marcandre . lureau
From: Keqian Zhu via The following points sometimes can reduce much data to copy: 1. When width matches, we can transfer data with one call of iov_to_buf(). 2. Only the required height need to transfer, not whole image. Signed-off-by: Keqian Zhu Reviewed-by: Marc-André Lureau Message-Id: <2023

[PULL 05/33] chardev/char-win-stdio: Support VT sequences on Windows 11 host

2023-06-27 Thread marcandre . lureau
From: Zhang Huasen If the monitor or the serial port use STDIO as backend on Windows 11 host, e.g. -nographic options is used, the monitor or the guest Linux do not response to arrow keys. When Windows creates a console, ENABLE_VIRTUAL_PROCESS_INPUT is disabled by default. Arrow keys cannot be r

[PULL 20/33] ui/dbus: introduce "Interfaces" properties

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau This property is similar to ``org.freedesktop.DBus.Interfaces`` property on the bus interface: it's an array of strings listing the extra interfaces and capabilities available, in a convenient way. Most interfaces are implicit, as they are required. For ``org/qemu/Display

[PULL 10/33] ui/gtk: set the area of the scanout texture correctly

2023-06-27 Thread marcandre . lureau
From: Dongwon Kim x and y offsets and width and height of the scanout texture is not correctly configured in case guest scanout frame is dmabuf. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Message-ID: <20230621213150.29573-1-dongwon@intel.com> -

[PULL 30/33] ui/egl: query ANGLE d3d device

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Check if ANGLE is being used with D3D backend. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-19-marcandre.lur...@redhat.com> --- include/ui/egl-helpers.h | 1 + ui/egl-helpers.c | 32 +++- ui/trace-events

[PULL 27/33] ui/dbus: add GL support on win32

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau Enable usage of dbus,gl= on win32. At this point, the scanout texture is read on the DisplaySurface memory, and the client is then updated with the "2D" API (with shared memory if possible). Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-16-marcandre

[PULL 08/33] virtio-gpu: Make non-gl display updates work again when blob=true

2023-06-27 Thread marcandre . lureau
From: Vivek Kasireddy In the case where the console does not have gl capability, and if blob is set to true, make sure that the display updates still work. Commit e86a93f55463 accidentally broke this by misplacing the return statement (in resource_flush) causing the updates to be silently ignored

[PULL 15/33] ui/dbus: compile without gio/gunixfdlist.h

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-4-marcandre.lur...@redhat.com> --- audio/dbusa

[PULL 00/33] UI patches

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 4329d049d5b8d4af71c6b399d64a6d1b98856318: Merge tag 'pull-tcg-20230626' of https://gitlab.com/rth7680/qemu into staging (2023-06-26 17:40:38 +0200) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.g

[PULL 01/33] ui: return NULL when getting cursor without a console

2023-06-27 Thread marcandre . lureau
From: Marc-André Lureau VNC may try to get the current cursor even when there are no consoles and crashes. Simple reproducer is qemu with -nodefaults. Fixes: (again) https://gitlab.com/qemu-project/qemu/-/issues/1548 Fixes: commit 385ac97f8 ("ui: keep current cursor with QemuConsole") Signed-of

[PATCH v2 1/2] gitlab-ci: grab msys2 meson-logs as artifacts

2023-06-20 Thread marcandre . lureau
From: Marc-André Lureau Rename build directory to "build", like most other CI builds. Signed-off-by: Marc-André Lureau --- .gitlab-ci.d/windows.yml | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 472bac

[PATCH v2 2/2] gitlab-ci: add msys2 meson test to junit report

2023-06-20 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .gitlab-ci.d/windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index d45794463a..f889a468b5 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -1

[PATCH v2 0/2] gitlab-ci: msys2 improvements

2023-06-20 Thread marcandre . lureau
From: Marc-André Lureau Hi, Submitting again this small series from last year. Marc-André Lureau (2): gitlab-ci: grab msys2 meson-logs as artifacts gitlab-ci: add msys2 meson test to junit report .gitlab-ci.d/windows.yml | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(

[PATCH 11/21] ui/dbus: use shared memory when possible on win32

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau When the display surface has an associated HANDLE, we can duplicate it to the client process and let it map the memory to avoid expensive copies. Introduce two new win32-specific methods ScanoutMap and UpdateMap. The first is used to inform the listener about the a shared

[PATCH 15/21] ui/dbus: add GL support on win32

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Enable usage of dbus,gl= on win32. At this point, the scanout texture is read on the DisplaySurface memory, and the client is then updated with the "2D" API (with shared memory if possible). Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 98 ++

[PATCH 20/21] virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Enable D3D texture sharing when possible, and pass it to the texture display callbacks. Signed-off-by: Marc-André Lureau --- meson.build | 6 ++ hw/display/virtio-gpu-virgl.c | 24 +++- 2 files changed, 25 insertions(+), 5 dele

[PATCH 18/21] ui/egl: query ANGLE d3d device

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Check if ANGLE is being used with D3D backend. Signed-off-by: Marc-André Lureau --- include/ui/egl-helpers.h | 1 + ui/egl-helpers.c | 32 +++- ui/trace-events | 3 +++ 3 files changed, 35 insertions(+), 1 deletion(-) diff

[PATCH 21/21] ui/dbus: use shared D3D11 Texture2D when possible

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau When the client implements "org.qemu.Display1.Listener.Win32.D3d11" and we are running on ANGLE/win32, share the scanout texture with the peer process, and draw with ScanoutTexture2d/UpdateTexture2d methods. Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 29

[PATCH 02/21] ui/egl: fix make_context_current() callback return value

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau eglMakeCurrent() returns 1/EGL_TRUE on success. This is not what the callback expects, where 0 indicates success. While at it, print the EGL error to ease debugging. As with virgl_renderer_callbacks, the return value is now checked since version >= 4: https://gitlab.free

[PATCH 03/21] ui/dbus: compile without gio/gunixfdlist.h

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by: Marc-André Lureau --- audio/dbusaudio.c | 7 +++ ui/dbus-chardev.c | 6 ++ ui/dbus-consol

[PATCH 19/21] ui: add optional d3d texture pointer to scanout texture

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau The following patch will get the underlying D3D11 Texture2D from the virgl renderer scanout. Pass it along to the texture scanout callbacks as a priliminary step, to simplify review. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 7 +-- includ

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