[PATCH v2 8/9] test-vmstate: add some subsection tests

2023-10-24 Thread marcandre . lureau
From: Marc-André Lureau Check subsection support, and optional handling. Signed-off-by: Marc-André Lureau --- tests/unit/test-vmstate.c | 116 ++ 1 file changed, 116 insertions(+) diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c index

[PATCH v2 1/9] block/fdc: 'phase' is not needed on load

2023-10-24 Thread marcandre . lureau
From: Marc-André Lureau It is reconstructed during fdc_post_load() Signed-off-by: Marc-André Lureau --- hw/block/fdc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index d7cc4d3ec1..fc71660ba0 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@

[PATCH v2 2/9] virtio: make endian_needed() work during loading

2023-10-24 Thread marcandre . lureau
From: Marc-André Lureau There is no simple way to distinguish when the callback is used for load or save, AFAICT. Signed-off-by: Marc-André Lureau --- hw/virtio/virtio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[PATCH v2 0/9] RFC: migration: check required entries and sections are loaded

2023-10-24 Thread marcandre . lureau
From: Marc-André Lureau Hi, Surprisingly, the migration code doesn't check that required migration entries and subsections are loaded. Either optional or required sections are both ignored when missing. According to the documentation a "newer QEMU that knows about a subsection can (with care)

[PATCH v5 05/19] ui/console: allow to override the default VC

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". For that, set the dpy.type just before creating the default serial/parallel/monitor. As suggested by Paolo, if the display doesn't implement a VC (get_vc() returns NULL), use a

[PATCH v5 09/19] ui/console: when PIXMAN is unavailable, don't draw placeholder msg

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau When we can't draw text, simply show a blank display. Signed-off-by: Marc-André Lureau --- ui/console.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/console.c b/ui/console.c index a72c495b5a..8e688d3569 100644 --- a/ui/console.c +++ b/ui/console.c @@ -584,6

[PATCH v5 10/19] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau This simply means that 2d drawing updates won't be handled, but 3d should work. Signed-off-by: Marc-André Lureau --- hw/display/vhost-user-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index

[PATCH v5 03/19] ui: add pixman-compat.h

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau This is a tiny subset of PIXMAN API that is used pervasively in QEMU codebase to manage images and identify the underlying format. It doesn't seems worth to wrap this in a QEMU-specific API. Signed-off-by: Marc-André Lureau --- include/ui/pixman-compat.h | 195

[PATCH v5 14/19] ui/gtk: -display gtk requires PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3d6e41d1fb..dbc7af091c 100644 --- a/meson.build +++ b/meson.build @@ -1507,7 +1507,11 @@ gtkx11 = not_found vte =

[PATCH v5 13/19] ui/spice: SPICE/QXL requires PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- hw/display/Kconfig | 2 +- ui/meson.build | 10 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index c4dd9e01ea..3d6e41d1fb 100644 ---

[PATCH v5 11/19] ui/gl: opengl doesn't require PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau The QEMU fallback covers the requirements. We still need the flags of header inclusion with CONFIG_PIXMAN. Signed-off-by: Marc-André Lureau --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index

[PATCH v5 07/19] qmp/hmp: disable screendump if PIXMAN is missing

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau The command requires color conversion and line-by-line feeding. We could have a simple fallback for simple formats though. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- qapi/ui.json | 3 ++- ui/ui-hmp-cmds.c | 2 ++ ui/ui-qmp-cmds.c | 2

[PATCH v5 16/19] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau The Display Port has some strong PIXMAN dependency. Signed-off-by: Marc-André Lureau --- hw/arm/Kconfig | 3 ++- hw/display/Kconfig | 5 + hw/display/meson.build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/arm/Kconfig

[PATCH v5 18/19] hw/display: make ATI_VGA depend on PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: BALATON Zoltan --- configs/devices/mips64el-softmmu/default.mak | 2 +- hw/display/Kconfig | 2 +- hw/display/meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)

[PATCH v5 19/19] build-sys: make pixman actually optional

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index dbc7af091c..6399321d72 100644 --- a/meson.build +++ b/meson.build @@ -817,9 +817,6 @@ if not get_option('pixman').auto() or have_system

[PATCH v5 12/19] ui/vnc: VNC requires PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- ui/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 395d7155f6..c4dd9e01ea 100644 --- a/meson.build +++ b/meson.build @@ -1536,7 +1536,11

[PATCH v5 08/19] virtio-gpu: replace PIXMAN for region/rect test

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Use a simpler implementation for rectangle geometry & intersect, drop the need for (more complex) PIXMAN functions. Signed-off-by: Marc-André Lureau --- include/ui/rect.h | 59 + hw/display/virtio-gpu.c | 30

[PATCH v5 02/19] ui: compile out some qemu-pixman functions when !PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Those functions require the PIXMAN library. Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 7 +-- ui/qemu-pixman.c | 6 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h

[PATCH v5 15/19] ui/dbus: do not require PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Implement a fallback path for region 2D update. Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 90 -- ui/meson.build | 4 +-- 2 files changed, 65 insertions(+), 29 deletions(-) diff --git a/ui/dbus-listener.c

[PATCH v5 04/19] vl: move display early init before default devices

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau The next commit needs to have the display registered itself before creating the default VCs. Signed-off-by: Marc-André Lureau --- system/vl.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/system/vl.c

[PATCH v5 17/19] hw/sm501: allow compiling without PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Drop the "x-pixman" property and use fallback path in such case. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 59 +- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/hw/display/sm501.c

[PATCH v5 06/19] ui/vc: console-vc requires PIXMAN

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Add stubs for the fallback paths. get_vc() now returns NULL by default if !PIXMAN. Signed-off-by: Marc-André Lureau --- ui/console-vc-stubs.c | 33 + ui/console.c | 3 +++ ui/meson.build| 2 +- 3 files changed, 37

[PATCH v5 00/19] Make Pixman an optional dependency

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau Hi, QEMU system emulators can be made to compile and work without Pixman. Only a few devices and options actually require it (VNC, Gtk, Spice for ex) and will have to be compiled out. However, most of QEMU graphics-related code is based on pixman_image_t and format. If

[PATCH v5 01/19] build-sys: add a "pixman" feature

2023-10-23 Thread marcandre . lureau
From: Marc-André Lureau For now, pixman is mandatory, but we set config_host.h and Kconfig. Once compilation is fixed, "pixman" will become actually optional. Signed-off-by: Marc-André Lureau --- meson.build | 10 -- include/ui/qemu-pixman.h | 2 ++

[PATCH v4 09/19] ui/console: when PIXMAN is unavailable, don't draw placeholder msg

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau When we can't draw text, simply show a blank display. Signed-off-by: Marc-André Lureau --- ui/console.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/console.c b/ui/console.c index a72c495b5a..8e688d3569 100644 --- a/ui/console.c +++ b/ui/console.c @@ -584,6

[PATCH v4 15/19] ui/dbus: do not require PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Implement a fallback path for region 2D update. Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 90 -- ui/meson.build | 4 +-- 2 files changed, 65 insertions(+), 29 deletions(-) diff --git a/ui/dbus-listener.c

[PATCH v4 10/19] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau This simply means that 2d drawing updates won't be handled, but 3d should work. Signed-off-by: Marc-André Lureau --- hw/display/vhost-user-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index

[PATCH v4 18/19] hw/display: make ATI_VGA depend on PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: BALATON Zoltan --- configs/devices/mips64el-softmmu/default.mak | 2 +- hw/display/Kconfig | 2 +- hw/display/meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)

[PATCH v4 12/19] ui/vnc: VNC requires PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- ui/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index ca17c213d3..87036496af 100644 --- a/meson.build +++ b/meson.build @@ -1536,7 +1536,11

[PATCH v4 07/19] qmp/hmp: disable screendump if PIXMAN is missing

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau The command requires color conversion and line-by-line feeding. We could have a simple fallback for simple formats though. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- qapi/ui.json | 3 ++- ui/ui-hmp-cmds.c | 2 ++ ui/ui-qmp-cmds.c | 2

[PATCH v4 01/19] build-sys: add a "pixman" feature

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau For now, pixman is mandatory, but we set config_host.h and Kconfig. Once compilation is fixed, "pixman" will become actually optional. Signed-off-by: Marc-André Lureau --- meson.build | 10 -- include/ui/qemu-pixman.h | 2 ++

[PATCH v4 17/19] hw/sm501: allow compiling without PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Drop the "x-pixman" property and use fallback path in such case. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 59 +- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/hw/display/sm501.c

[PATCH v4 02/19] ui: compile out some qemu-pixman functions when !PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Those functions require the PIXMAN library. Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 7 +-- ui/qemu-pixman.c | 6 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h

[PATCH v4 05/19] ui/console: allow to override the default VC

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". For that, set the dpy.type just before creating the default serial/parallel/monitor. As suggested by Paolo, if the display doesn't implement a VC (get_vc() returns NULL), use a

[PATCH v4 13/19] ui/spice: SPICE/QXL requires PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- hw/display/Kconfig | 2 +- ui/meson.build | 10 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 87036496af..3e5b6dc3eb 100644 ---

[PATCH v4 19/19] build-sys: make pixman actually optional

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index 39b4632ed2..77a3ca98ee 100644 --- a/meson.build +++ b/meson.build @@ -817,9 +817,6 @@ if not get_option('pixman').auto() or have_system

[PATCH v4 03/19] ui: add pixman-compat.h

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau This is a tiny subset of PIXMAN API that is used pervasively in QEMU codebase to manage images and identify the underlying format. It doesn't seems worth to wrap this in a QEMU-specific API. Signed-off-by: Marc-André Lureau --- include/ui/pixman-compat.h | 195

[PATCH v4 14/19] ui/gtk: -display gtk requires PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3e5b6dc3eb..39b4632ed2 100644 --- a/meson.build +++ b/meson.build @@ -1507,7 +1507,11 @@ gtkx11 = not_found vte =

[PATCH v4 04/19] vl: move display early init before default devices

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau The next commit needs to have the display registered itself before creating the default VCs. Signed-off-by: Marc-André Lureau --- system/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/vl.c b/system/vl.c index 3100ac01ed..73e4ed2bef

[PATCH v4 16/19] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau The Display Port has some strong PIXMAN dependency. Signed-off-by: Marc-André Lureau --- hw/arm/Kconfig | 3 ++- hw/display/Kconfig | 5 + hw/display/meson.build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/arm/Kconfig

[PATCH v4 00/19] Make Pixman an optional dependency

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Hi, QEMU system emulators can be made to compile and work without Pixman. Only a few devices and options actually require it (VNC, Gtk, Spice for ex) and will have to be compiled out. However, most of QEMU graphics-related code is based on pixman_image_t and format. If

[PATCH v4 08/19] virtio-gpu: replace PIXMAN for region/rect test

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Use a simpler implementation for rectangle geometry & intersect, drop the need for (more complex) PIXMAN functions. Signed-off-by: Marc-André Lureau --- include/ui/rect.h | 59 + hw/display/virtio-gpu.c | 30

[PATCH v4 06/19] ui/vc: console-vc requires PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau Add stubs for the fallback paths. get_vc() now returns NULL by default if !PIXMAN. Signed-off-by: Marc-André Lureau --- ui/console-vc-stubs.c | 33 + ui/console.c | 3 +++ ui/meson.build| 2 +- 3 files changed, 37

[PATCH v4 11/19] ui/gl: opengl doesn't require PIXMAN

2023-10-18 Thread marcandre . lureau
From: Marc-André Lureau The QEMU fallback covers the requirements. We still need the flags of header inclusion with CONFIG_PIXMAN. Signed-off-by: Marc-André Lureau --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index

[PATCH] gtk: force realization of drawing area

2023-10-17 Thread marcandre . lureau
From: Marc-André Lureau Fixes the GL context creation from a widget that isn't yet realized (in a hidden tab for example). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1727 Signed-off-by: Marc-André Lureau --- ui/gtk.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PULL 4/9] virtio-gpu: blob prep

2023-10-16 Thread marcandre . lureau
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki

[PULL 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-10-16 Thread marcandre . lureau
From: Gurchetan Singh This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil

[PULL 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-10-16 Thread marcandre . lureau
From: Gurchetan Singh This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been

[PULL 3/9] virtio-gpu: hostmem

2023-10-16 Thread marcandre . lureau
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Acked-by: Michael S. Tsirkin Reviewed-by: Akihiko Odaki ---

[PULL 8/9] gfxstream + rutabaga: enable rutabaga

2023-10-16 Thread marcandre . lureau
From: Gurchetan Singh This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Antonio Caggiano Reviewed-by: Emmanouil Pitsidianakis

[PULL 7/9] gfxstream + rutabaga: meson support

2023-10-16 Thread marcandre . lureau
From: Gurchetan Singh - Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis

[PULL 9/9] docs/system: add basic virtio-gpu documentation

2023-10-16 Thread marcandre . lureau
From: Gurchetan Singh This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano

[PULL 2/9] virtio-gpu: CONTEXT_INIT feature

2023-10-16 Thread marcandre . lureau
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Reviewed-by: Marc-André Lureau Reviewed-by: Philippe

[PULL 1/9] virtio: Add shared memory capability

2023-10-16 Thread marcandre . lureau
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David

[PULL 0/9] virtio-gpu patches

2023-10-16 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 63011373ad22c794a013da69663c03f1297a5c56: Merge tag 'pull-riscv-to-apply-20231012-1' of https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 -0400) are available in the Git repository at:

[PULL 5/8] hw/audio/es1370: remove #ifdef ES1370_VERBOSE to avoid bit rot

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin Replace the #ifdef ES1370_VERBOSE code with code that the compiler can optimize away to avoid bit rot and fix the already rotten code. Tested-by: Rene Engel Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON Zoltan Message-Id:

[PULL 6/8] hw/audio/es1370: block structure coding style fixes

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin Change the block structure according to the QEMU Coding Style documentation. Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON Zoltan Message-Id: <20230917065813.6692-6-vr_q...@t-online.de> --- hw/audio/es1370.c | 36

[PULL 7/8] hw/audio/es1370: change variable type and name

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin Change the type of the variable temp to size_t to avoid a type cast. While at it, rename the variable name to to_transfer. This improves the readability of the code. Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON Zoltan Message-Id:

[PULL 8/8] hw/audio/es1370: trace lost interrupts

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin It turns out that there are drivers which assume that interrupts can't be lost. E.g. the AROS sb128 driver is such a driver. Add a lost interrupt tracepoint to debug this kind of issues. Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON

[PULL 0/8] Audio patches

2023-10-11 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit cea3ea670fe265421131aad90c36fbb87bc4d206: Merge tag 'pull-vfio-20231009' of https://github.com/legoater/qemu into staging (2023-10-09 10:11:35 -0400) are available in the Git repository at:

[PULL 4/8] hw/audio/es1370: remove #ifdef ES1370_DEBUG to avoid bit rot

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin Replace the #ifdef ES1370_DEBUG code with code that the compiler can optimize away to avoid bit rot. While at it, replace strcat() with pstrcat(). Tested-by: Rene Engel Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON Zoltan Message-Id:

[PULL 2/8] hw/audio/es1370: replace bit-rotted code with tracepoints

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin It seems that nobody has enabled the debug code of the ES1370 device for a long time. Since then, the code has bit-rotted. Replace the bit-rotten code with tracepoints. Tested-by: Rene Engel Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON

[PULL 3/8] hw/audio/es1370: remove unused dolog macro

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin The dolog macro is unused. Remove the macro and use the now unused ES1370_VERBOSE macro to replace its inverse ES1370_SILENT macro. Tested-by: Rene Engel Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Tested-by: BALATON Zoltan Message-Id:

[PULL 1/8] hw/audio/es1370: reset current sample counter

2023-10-11 Thread marcandre . lureau
From: Volker Rümelin Reset the current sample counter when writing the Channel Sample Count Register. The Linux ens1370 driver and the AROS sb128 driver expect the current sample counter counts down from sample count to 0 after a write to the Channel Sample Count Register. Currently the current

[PATCH v3 16/18] hw/sm501: allow compiling without PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Drop the "x-pixman" property and use fallback path in such case. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 46 +- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/hw/display/sm501.c

[PATCH v3 03/18] ui: add pixman-compat.h

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau This is a tiny subset of PIXMAN API that is used pervasively in QEMU codebase to manage images and identify the underlying format. It doesn't seems worth to wrap this in a QEMU-specific API. Signed-off-by: Marc-André Lureau --- include/ui/pixman-compat.h | 195

[PATCH v3 13/18] ui/gtk: -display gtk requires PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index a84a2f25d0..64d2aca79b 100644 --- a/meson.build +++ b/meson.build @@ -1501,7 +1501,11 @@ gtkx11 = not_found vte =

[PATCH v3 14/18] ui/dbus: do not require PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Implement a fallback path for region 2D update. Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 88 -- ui/meson.build | 2 +- 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/ui/dbus-listener.c

[PATCH v3 10/18] ui/gl: opengl doesn't require PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau The QEMU fallback covers the requirements. We still need the flags of header inclusion with CONFIG_PIXMAN. Signed-off-by: Marc-André Lureau --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index

[PATCH v3 12/18] ui/spice: SPICE/QXL requires PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- hw/display/Kconfig | 2 +- ui/meson.build | 10 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 291c2f1301..a84a2f25d0 100644 ---

[PATCH v3 06/18] qmp/hmp: disable screendump if PIXMAN is missing

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau The command requires color conversion and line-by-line feeding. We could have a simple fallback for simple formats though. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- qapi/ui.json | 3 ++- ui/ui-hmp-cmds.c | 2 ++ ui/ui-qmp-cmds.c | 2

[PATCH v3 08/18] ui/console: when PIXMAN is unavailable, don't draw placeholder msg

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau When we can't draw text, simply show a blank display. Signed-off-by: Marc-André Lureau --- ui/console.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/console.c b/ui/console.c index a72c495b5a..8e688d3569 100644 --- a/ui/console.c +++ b/ui/console.c @@ -584,6

[PATCH v3 05/18] ui/vc: console-vc requires PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Add stubs for the fallback paths. get_vc() now returns NULL by default if !PIXMAN. Signed-off-by: Marc-André Lureau --- ui/console-vc-stubs.c | 32 ui/console.c | 3 +++ ui/meson.build| 2 +- 3 files changed, 36

[PATCH v3 17/18] hw/display: make ATI_VGA depend on PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- configs/devices/mips64el-softmmu/default.mak | 2 +- hw/display/Kconfig | 2 +- hw/display/meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v3 02/18] ui: compile out some qemu-pixman functions when !PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Those functions require the PIXMAN library. Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 7 +-- ui/qemu-pixman.c | 6 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h

[PATCH v3 18/18] build-sys: make pixman actually optional

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index 64d2aca79b..a35eb8e2ee 100644 --- a/meson.build +++ b/meson.build @@ -817,9 +817,6 @@ if not get_option('pixman').auto() or have_system

[PATCH v3 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau This simply means that 2d drawing updates won't be handled, but 3d should work. Signed-off-by: Marc-André Lureau --- hw/display/vhost-user-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index

[PATCH v3 04/18] ui/console: allow to override the default VC

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". For that, set the dpy.type just before creating the default serial/parallel/monitor. As suggested by Paolo, if the display doesn't implement a VC (get_vc() returns NULL), use a

[PATCH v3 07/18] virtio-gpu: replace PIXMAN for region/rect test

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Use a simpler implementation for rectangle geometry & intersect, drop the need for (more complex) PIXMAN functions. Signed-off-by: Marc-André Lureau --- include/ui/rect.h | 55 + hw/display/virtio-gpu.c | 30

[PATCH v3 15/18] arm/kconfig: XLNX_ZYNQMP_ARM depends on PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau The Display Port has some strong PIXMAN dependency. Signed-off-by: Marc-André Lureau --- hw/arm/Kconfig | 3 ++- hw/display/Kconfig | 5 + hw/display/meson.build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/arm/Kconfig

[PATCH v3 11/18] ui/vnc: VNC requires PIXMAN

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- ui/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index c30da15ce6..291c2f1301 100644 --- a/meson.build +++ b/meson.build @@ -1530,7 +1530,11

[PATCH v3 00/18] Make Pixman an optional dependency

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau Hi, QEMU system emulators can be made to compile and work without Pixman. Only a few devices and options actually require it (VNC, Gtk, Spice for ex) and will have to be compiled out. However, most of QEMU graphics-related code is based on pixman_image_t and format. If

[PATCH v3 01/18] build-sys: add a "pixman" feature

2023-10-10 Thread marcandre . lureau
From: Marc-André Lureau For now, pixman is mandatory, but we set config_host.h and Kconfig. Once compilation is fixed, "pixman" will become actually optional. Signed-off-by: Marc-André Lureau --- meson.build | 10 -- include/ui/qemu-pixman.h | 2 ++

[PATCH] memory: follow Error API guidelines

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Return true/false on success/failure. Signed-off-by: Marc-André Lureau --- include/hw/core/cpu.h | 4 +++- include/hw/core/sysemu-cpu-ops.h | 2 +- include/sysemu/memory_mapping.h | 2 +- target/i386/cpu.h | 2 +- hw/core/cpu-sysemu.c

[PATCH] memory: drop needless argument

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau The argument is unused since commit bdc44640c ("cpu: Use QTAILQ for CPU list"). Signed-off-by: Marc-André Lureau --- softmmu/memory_mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c

[PATCH v5 3/3] hw/vfio: add ramfb migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau Reviewed-by: Laszlo Ersek --- hw/vfio/pci.h | 3 +++ hw/core/machine.c | 1 +

[PATCH v5 1/3] ramfb: add migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Implementing RAMFB migration is quite straightforward. One caveat is to treat the whole RAMFBCfg as a blob, since that's what is exposed to the guest directly. This avoid having to fiddle with endianness issues if we were to migrate fields individually as integers. The

[PATCH v5 2/3] ramfb-standalone: add migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add a "ramfb-dev" section whenever "x-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau Reviewed-by: Laszlo Ersek --- hw/core/machine.c | 1 + hw/display/ramfb-standalone.c | 27

[PATCH v5 0/3] ramfb: migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Hi, Implement RAMFB migration, and add properties to enable it only on >= 8.2 machines, + a few related cleanups. thanks v5: - add missing VMSTATE_END_OF_LIST - changed ramfb=off & x-mig=on user config error to a warning - add r-b tags v4: (Laszlo review and

[PATCH v4 0/3] WIP: ramfb: migration support

2023-10-05 Thread marcandre . lureau
From: Marc-André Lureau Hi, Implement RAMFB migration, and add properties to enable it only on >= 8.2 machines, + a few related cleanups. Cedric, did you get the chance to test the VFIO display/ramfb code? thanks v4: (Laszlo review and suggestions) - change migrate_needed() to

[PATCH v4 3/3] hw/vfio: add ramfb migration support

2023-10-05 Thread marcandre . lureau
From: Marc-André Lureau Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau --- hw/vfio/pci.h | 3 +++ hw/core/machine.c | 1 + hw/vfio/display.c | 20

[PATCH v4 2/3] ramfb-standalone: add migration support

2023-10-05 Thread marcandre . lureau
From: Marc-André Lureau Add a "ramfb-dev" section whenever "x-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau --- hw/core/machine.c | 4 +++- hw/display/ramfb-standalone.c | 27

[PATCH v4 1/3] ramfb: add migration support

2023-10-05 Thread marcandre . lureau
From: Marc-André Lureau Implementing RAMFB migration is quite straightforward. One caveat is to treat the whole RAMFBCfg as a blob, since that's what is exposed to the guest directly. This avoid having to fiddle with endianness issues if we were to migrate fields individually as integers. The

[PULL 12/13] hw/display/ramfb: plug slight guest-triggerable leak on mode setting

2023-10-03 Thread marcandre . lureau
From: Laszlo Ersek The fw_cfg DMA write callback in ramfb prepares a new display surface in QEMU; this new surface is put to use ("swapped in") upon the next display update. At that time, the old surface (if any) is released. If the guest triggers the fw_cfg DMA write callback at least twice

[PULL 03/13] ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead()

2023-10-03 Thread marcandre . lureau
From: Laszlo Ersek qemu_console_is_multihead() declares the console "c" a "multihead" console if there are two different consoles in the system that (a) both reference "c->device", and (b) have different "c->head" numbers. In effect, if at least two consoles exist that are different heads of the

[PULL 13/13] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected

2023-10-03 Thread marcandre . lureau
From: Thomas Huth When starting a guest via libvirt with "virsh start --console ...", the first second of the console output is missing. This is especially annoying on s390x that only has a text console by default and no graphical output - if the bios fails to boot here, the information about

[PULL 11/13] hw/pc: remove needless includes

2023-10-03 Thread marcandre . lureau
From: Marc-André Lureau The include list is gigantic, make it smaller. Signed-off-by: Marc-André Lureau Acked-by: Laszlo Ersek --- hw/i386/pc.c | 39 --- 1 file changed, 39 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5d399b6247..ec01d74482

[PULL 09/13] analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH

2023-10-03 Thread marcandre . lureau
From: Marc-André Lureau Traceback (most recent call last): File "scripts/analyze-migration.py", line 605, in dump.read(dump_memory = args.memory) File "scripts/analyze-migration.py", line 542, in read section.read() File "scripts/analyze-migration.py", line 214, in read raise

[PULL 06/13] ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map

2023-10-03 Thread marcandre . lureau
From: Ken Xue Android uses XBGR and ABGR as default scanout buffer, But qemu does not support them for qemu_pixman_to_drm_format conversion within virtio_gpu_create_dmabuf for virtio gpu. so, add those 2 formats into drm_format_pixman_map. Signed-off-by: Ken Xue Reviewed-by:

[PULL 08/13] ui/gtk: fix UI info precondition

2023-10-03 Thread marcandre . lureau
From: Marc-André Lureau dpy_get_ui_info() shouldn't be called if the underlying GPU doesn't support it. Before the assert() was added and the regression introduced, GTK code used to get "zero" UI info, for ex with a simple VGA device. The assert was added to prevent from calling when there are

<    1   2   3   4   5   6   7   8   9   10   >