Re: [PATCH v6 03/24] migration: push Error **errp into qemu_loadvm_state_header()

2025-07-21 Thread Marc-André Lureau
Hi On Mon, Jul 21, 2025 at 3:30 PM Arun Menon wrote: > This is an incremental step in converting vmstate loading > code to report error via Error objects instead of directly > printing it to console/monitor. > It is ensured that qemu_loadvm_state_header() must report an error > in errp, in case

Re: [PATCH v6 02/24] migration: push Error **errp into vmstate_load_state()

2025-07-21 Thread Marc-André Lureau
Hi On Mon, Jul 21, 2025 at 3:35 PM Arun Menon wrote: > This is an incremental step in converting vmstate loading > code to report error via Error objects instead of directly > printing it to console/monitor. > It is ensured that vmstate_load_state() must report an error > in errp, in case of fai

Re: [PATCH] ui/spice: Destroy the temporary egl fb after the blit is submitted

2025-07-21 Thread Marc-André Lureau
> is empty initialized before it is actually used. > > Fixes: f851cd65 ("ui/spice: Blit the scanout texture if its memory layout is > not linear") > Reported-by: Peter Maydell > Cc: Marc-André Lureau > Signed-off-by: Vivek Kasireddy Reviewed-by: Marc-André

Re: HVF EL2 support in QEMU (aka FEAT_NV/FEAT_NV2) for MacOS

2025-07-17 Thread Marc Zyngier
On Thu, 17 Jul 2025 16:45:37 +0100, Mark Burton wrote: > > So long as we can also switch to the emulated GIC when we want/need > to :-) (looking at you KVM :-)) KVM really doesn't need such a non-feature. Specially as it cannot be implemented without an actual GICv3 in HW, for obvious reasons.

Re: HVF EL2 support in QEMU (aka FEAT_NV/FEAT_NV2) for MacOS

2025-07-15 Thread Marc Zyngier
On Tue, 15 Jul 2025 12:15:52 +0100, Alex Bennée wrote: > - do we know which Apple silicon supports FEAT_NV2? M2 and latter definitely support FEAT_NV2. That's how KVM NV support has been developed for two years until I was given better HW. Whether Apple supports NV on M2 in HVF, I have no ide

Re: [PULL v2 00/13] Ui patches

2025-07-14 Thread Marc-André Lureau
Hi On Tue, Jul 15, 2025 at 10:36 AM wrote: > > From: Marc-André Lureau > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -040

Re: [PATCH] gtk: Skip drawing if console surface is NULL

2025-07-14 Thread Marc-André Lureau
In practice, this case wouldn't happen at all because we always install > a placeholder surface to the console when there is nothing to display. > > Resolves: Coverity CID 1610328 > Signed-off-by: Weifeng Liu Reviewed-by: Marc-André Lureau > --- > ui/gtk-egl.c | 5

Re: [PULL 00/13] Ui patches

2025-07-14 Thread Marc-André Lureau
On Mon, Jul 14, 2025 at 3:45 PM wrote: > > From: Marc-André Lureau > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -040

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

2025-07-11 Thread Marc-André Lureau
ee scale mode, resulting > > in incorrect cursor coordinates to be sent when moving the mouse > > pointer. Simply updating the scales before rendering the image fixes > > this issue. > > > > Signed-off-by: Weifeng Liu > > Message-ID: <20250511073337.876650-

Re: [PATCH v6 1/1] hw/display: Allow injection of virtio-gpu EDID name

2025-07-10 Thread Marc-André Lureau
ot;driver":"virtio-vga", > "max_outputs":2, > "id":"vga", > "outputs":[ > { > "name":"AAA" > }, >

Re: i.MX6 SabreLite FlexCAN emulation for QEMU progress/working

2025-07-10 Thread Marc Kleine-Budde
On 10.07.2025 12:58:05, Pavel Pisa wrote: > Hello Marc and others, > > Matyas Bobek has implemented FlexCAN emulation for i.MX6 > targets in the frame of his bachelor thesis > > > https://dspace.cvut.cz/bitstream/handle/10467/122654/F3-BP-2025-Bobek-Matyas-BP_Bobe

Re: [PATCH v5 1/1] hw/display: Allow injection of virtio-gpu EDID name

2025-07-08 Thread Marc-André Lureau
ot;driver":"virtio-vga", > "max_outputs":2, > "id":"vga", > "outputs":[ > { > "name":"AAA", > }, > { >

Re: [PATCH v7 4/4] hw/arm/virt: Allow virt extensions with KVM

2025-07-07 Thread Marc Zyngier
On Mon, 07 Jul 2025 15:46:04 +0100, Peter Maydell wrote: > > On Mon, 7 Jul 2025 at 15:32, Marc Zyngier wrote: > > > > On Mon, 07 Jul 2025 10:53:38 +0100, > > Peter Maydell wrote: > > > > > > On Mon, 7 Jul 2025 at 10:30, Eric Auger wrote: > > &g

Re: [PATCH v7 4/4] hw/arm/virt: Allow virt extensions with KVM

2025-07-07 Thread Marc Zyngier
On Mon, 07 Jul 2025 10:53:38 +0100, Peter Maydell wrote: > > On Mon, 7 Jul 2025 at 10:30, Eric Auger wrote: > > > > Hi Peter, Marc, > > > > On 7/4/25 2:22 PM, Peter Maydell wrote: > > > I suppose the system registers probably generally Just Work > &

Re: [PATCH v7 1/4] hw/arm: Allow setting KVM vGIC maintenance IRQ

2025-07-04 Thread Marc Zyngier
On Fri, 04 Jul 2025 13:01:05 +0100, Peter Maydell wrote: > > On Wed, 2 Jul 2025 at 17:31, Eric Auger wrote: > > > > From: Haibo Xu > > > > Allow virt arm machine to set the interrupt ID for the KVM > > GIC maintenance interrupt. > > > > This setting must be done before the KVM_DEV_ARM_VGIC_CTRL

Re: [PATCH v4 1/1] hw/display: Allow injection of virtio-gpu EDID name

2025-07-02 Thread Marc-André Lureau
\ > DEFINE_PROP_UINT32("max_outputs", _state, _conf.max_outputs, 1),\ > +DEFINE_PROP_VIRTIO_GPU_OUTPUT_LIST("outputs", _state, _conf.outputs), \ > DEFINE_PROP_BIT("edid", _state, _conf.flags, \ > VIRTIO_GPU_FLAG_EDID_ENABLED, true), \ > DEFINE_PROP_UINT32("xres", _state, _conf.xres, 1280), \ > diff --git a/qapi/virtio.json b/qapi/virtio.json > index 73df718a26..eb6a907c40 100644 > --- a/qapi/virtio.json > +++ b/qapi/virtio.json > @@ -963,17 +963,31 @@ > { 'struct': 'IOThreadVirtQueueMapping', >'data': { 'iothread': 'str', '*vqs': ['uint16'] } } > > +## > +# @VirtIOGPUOutput: > +# > +# Describes configuration of a VirtIO GPU output. > +# > +# @name: the name of the output > +# > +# Since: 9.0 Needs to be 10.1 > +## > + > +{ 'struct': 'VirtIOGPUOutput', > + 'data': { 'name': 'str' } } > + > ## > # @DummyVirtioForceArrays: > # > # Not used by QMP; hack to let us use IOThreadVirtQueueMappingList > -# internally > +# and VirtIOGPUOutputList internally > # > # Since: 9.0 > ## > > { 'struct': 'DummyVirtioForceArrays', > - 'data': { 'unused-iothread-vq-mapping': ['IOThreadVirtQueueMapping'] } } > + 'data': { 'unused-iothread-vq-mapping': ['IOThreadVirtQueueMapping'], > +'unused-virtio-gpu-output': ['VirtIOGPUOutput'] } } > > ## > # @GranuleMode: > -- > 2.50.0.727.gbf7dc18ff4-goog > > -- Marc-André Lureau

Re: [PATCH 3/3] backends/tpm: Propagate vTPM error on migration failure

2025-07-01 Thread Marc-André Lureau
rp); > int (*pre_save)(void *opaque); > int (*post_save)(void *opaque); > bool (*needed)(void *opaque); > diff --git a/migration/vmstate.c b/migration/vmstate.c > index > 3f8c3d3c1dcfe14d70bab1f43b827244eb4bb385..c5dfffd9bad7285e819d4769e055d47157caab34 > 100644 > --- a/migration/vmstate.c > +++ b/migration/vmstate.c > @@ -232,7 +232,9 @@ int vmstate_load_state(QEMUFile *f, const > VMStateDescription *vmsd, > qemu_file_set_error(f, ret); > return ret; > } > -if (vmsd->post_load) { > +if (vmsd->post_load_with_error) { > +ret = vmsd->post_load_with_error(opaque, version_id, errp); > +} else if (vmsd->post_load) { > ret = vmsd->post_load(opaque, version_id); > } > trace_vmstate_load_state_end(vmsd->name, "end", ret); > > -- > 2.49.0 > > -- Marc-André Lureau

Re: [PATCH] ui/vnc: Update display update interval when VM state changes to RUNNING

2025-06-11 Thread Marc-André Lureau
Hi On Wed, Jun 11, 2025 at 4:34 PM Peter Xu wrote: > On Wed, May 21, 2025 at 05:16:13PM +0200, Juraj Marcin wrote: > > From: Juraj Marcin > > > > If a virtual machine is paused for an extended period time, for example, > > due to an incoming migration, there are also no changes on the screen. >

Re: [PATCH 2/3] scripts/qapi: add QAPISchemaIfCond.rsgen()

2025-06-10 Thread Marc-André Lureau
Hi On Thu, Jun 5, 2025 at 2:11 PM Paolo Bonzini wrote: > From: Marc-André Lureau > > Generate Rust #[cfg(...)] guards from QAPI 'if' conditions. > > Signed-off-by: Marc-André Lureau > Link: > https://lore.kernel.org/r/20210907121943.3498701-15-marcandre.lu

Re: [PATCH 1/3] rust: make TryFrom macro more resilient

2025-06-10 Thread Marc-André Lureau
Error do not use the associated type > at all. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > rust/qemu-api-macros/src/lib.rs | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/rust/qemu-api-macros/src/lib.rs b/rust/qemu-

Re: [PATCH preview 0/3] reviving minimal QAPI generation from 2021

2025-06-10 Thread Marc-André Lureau
} > } > > impl CloneToForeign for UefiVariable { > fn clone_to_foreign(&self) -> OwnedPointer { > OwnedPointer::new(qapi::to_c(self)) > } > } > > impl FromForeign for UefiVariable { > unsafe fn cloned_from_foreign(obj: *const bindings

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

2025-06-10 Thread Marc-André Lureau
> > > > > On Wed, May 28, 2025 at 10:11:13PM -0700, 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. >

Re: [PATCH 0/2] ui: fix VNC endian regression & improve tracing

2025-06-04 Thread Marc-André Lureau
t; ui/vnc.c| 53 + > 2 files changed, 67 insertions(+) > Series: Reviewed-by: Marc-André Lureau > > -- > 2.49.0 > >

Re: [PATCH v3 1/2] ui/vnc: Do not copy z_stream

2025-06-04 Thread Marc-André Lureau
stream > and returns Z_STREAM_ERROR, leaking the allocated memory. > > Avoid copying the zlib state to fix the memory leak. > > Fixes: bd023f953e5e ("vnc: threaded VNC server") > Signed-off-by: Akihiko Odaki lgtm, Reviewed-by: Marc-André Lureau I wonder if VncZlib could

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

2025-06-04 Thread Marc-André Lureau
the issue with better default for video-codecs is on spice-server side, so for this series: Reviewed-by: Marc-André Lureau > v4 -> v5 (suggestions from Marc-André): > - Fix the errors (mostly 80 chars limit violations) identified by > scripts/checkpatch.pl > - Rename the globa

Re: [PATCH 0/2] ui/gtk: Add keep-aspect-ratio and scale option

2025-06-03 Thread Marc-André Lureau
dded > to the host window to preserve the aspect ratio of guest frame-buffer. > > - scale: allow user to set a preferred scale factor, which would be > helpful for users running on a hi-dpi desktop to achieve pixel to > pixel display. > > Cc: BALATON Zoltan > Cc: Gerd

Re: [PATCH v2 0/2] ui/vnc: Do not copy z_stream

2025-06-01 Thread Marc-André Lureau
Hi Akihiko On Sat, May 31, 2025 at 4:55 PM Akihiko Odaki wrote: > vnc_worker_thread_loop() copies z_stream stored in its local VncState to > the persistent VncState, and the copied one is freed with deflateEnd() > later. However, deflateEnd() refuses to operate with a copied z_stream > and retur

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-28 Thread Marc Zyngier
On Wed, 28 May 2025 00:52:40 +0100, Miguel Luis wrote: > > > > > On 27 May 2025, at 16:52, Marc Zyngier wrote: > > > > On Tue, 27 May 2025 16:55:32 +0100, > > Miguel Luis wrote: > >> >> Result on the guest: Splat at early_kvm_mode_cfg,

Re: [PATCH] ui/vnc: Update display update interval when VM state changes to RUNNING

2025-05-27 Thread Marc-André Lureau
gt; and changing the update interval when the VM state changes to RUNNING. > The update_displaychangelistener() function updates the internal timer, > and the display is refreshed immediately if the timer is expired. > > Signed-off-by: Juraj Marcin Reviewed-by: Marc-André Lureau

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
On Tue, 27 May 2025 16:55:32 +0100, Miguel Luis wrote: > > Hi Marc, > > > On 27 May 2025, at 13:46, Marc Zyngier wrote: > > > > On Tue, 27 May 2025 14:24:31 +0100, > > Miguel Luis wrote: > >> > >> > >> > >>> On 27 M

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
On Tue, 27 May 2025 14:11:41 +0100, Eric Auger wrote: > > Hi Miguel, Marc, > > On 5/27/25 2:54 PM, Miguel Luis wrote: > > > >> On 27 May 2025, at 12:01, Marc Zyngier wrote: > >> > >> On Tue, 27 May 2025 12:33:23 +0100, > >> Miguel Luis wr

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
On Tue, 27 May 2025 14:24:31 +0100, Miguel Luis wrote: > > > > > On 27 May 2025, at 12:02, Marc Zyngier wrote: > > > > On Tue, 27 May 2025 12:40:35 +0100, > > Miguel Luis wrote: > >> > >> Hi Marc, > >> > >>

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
On Tue, 27 May 2025 12:40:35 +0100, Miguel Luis wrote: > > Hi Marc, > > > On 27 May 2025, at 07:39, Marc Zyngier wrote: > > > > Hi Eric, > > > > On Tue, 27 May 2025 07:24:32 +0100, > > Eric Auger wrote: > >> > >> Now tha

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
On Tue, 27 May 2025 12:33:23 +0100, Miguel Luis wrote: > > Hi Eric, > > > On 27 May 2025, at 06:24, Eric Auger wrote: > > > > Now that ARM nested virt has landed in kvm/next, let's turn the series > > into a PATCH series. The linux header update was made against kvm/next. > > > > For gaining

Re: [PATCH v5 0/5] ARM Nested Virt Support

2025-05-27 Thread Marc Zyngier
Hi Eric, On Tue, 27 May 2025 07:24:32 +0100, Eric Auger wrote: > > Now that ARM nested virt has landed in kvm/next, let's turn the series > into a PATCH series. The linux header update was made against kvm/next. > > For gaining virt functionality in KVM accelerated L1, The host needs to > be bo

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

2025-05-26 Thread Marc-André Lureau
tion until the guest can provide enough audio frames. Timer based > > playback doesn't have that problem." > > > > But users cannot easily find this option and having a non-working > > default is really unhelpful so to make life easier just set it to > > false

Re: [PATCH] audio: Reset rate control when adding bytes

2025-05-25 Thread Marc-André Lureau
> not. > > Reset the rate control in audio_rate_add_bytes(), which is called only > when actually adding frames, according to the previous call to > audio_rate_peek_bytes() to avoid frequent rate control resets even when > the guest generates no frame. > > Signed-off-by: Ak

Re: [PATCH 0/4] chardev: Fix issues found by vhost-user-test

2025-05-24 Thread Marc-André Lureau
chardev: Introduce a lock for hup_source Daniel, would you take the first 3 (or all) patches in your next I/O PR ? > > chardev/char-io.c | 5 + > chardev/char-socket.c | 38 -- > chardev/char.c | 2 ++ > include/chardev/char.h | 1 + > 4 files changed, 20 insertions(+), 26 deletions(-) > > -- > 2.35.3 > > -- Marc-André Lureau

Re: [PATCH v4 4/7] ui/spice: Add an option to submit gl_draw requests at fixed rate

2025-05-24 Thread Marc-André Lureau
ue using the GUI refresh timer. Otherwise, the updates > or gl_draw requests would be sent as soon as the Guest submits a new > frame which is not optimal as it would lead to increased network > traffic and wastage of GPU cycles if the frames get dropped. > > Cc: Gerd Hoffmann &g

Re: [PATCH v4 4/7] ui/spice: Add an option to submit gl_draw requests at fixed rate

2025-05-24 Thread Marc-André Lureau
sing the GUI refresh timer. Otherwise, the updates > or gl_draw requests would be sent as soon as the Guest submits a new > frame which is not optimal as it would lead to increased network > traffic and wastage of GPU cycles if the frames get dropped. > > Cc: Gerd Hoffmann > Cc: M

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

2025-05-24 Thread Marc-André Lureau
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: Dmitry Osipenko > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off-by: Vivek Kasireddy > ---

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

2025-05-24 Thread Marc-André Lureau
> > for v5, please fix the patches to pass scripts/checkpatch.pl. > v3 -> v4 (suggestions from Marc-André): > - Add a new parameter to make max_refresh_rate configurable > - Have surface_gl_create_texture_from_fd() return bool after checking > for errors > - Remove the che

Re: [PATCH 0/7] audio related fixes for 10.1

2025-05-11 Thread Marc-André Lureau
12 ++-- > audio/mixeng.c | 83 > audio/mixeng.h | 6 +- > hw/audio/asc.c | 9 ++- > tests/functional/test_m68k_q800.py | 3 +- > tests/functional/test_m68k_replay.py | 3 +- > 7 files changed, 10

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

2025-05-09 Thread Marc-André Lureau
Hi On Fri, May 9, 2025 at 3:31 PM Daniel P. Berrangé wrote: > > On Tue, Mar 11, 2025 at 07:59:28PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Buffer is slightly more advanced than GByteArray, since it has a > > cursor/position. Bu

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

2025-05-06 Thread Marc-André Lureau
Hi On Tue, Mar 11, 2025 at 8:16 PM Daniel P. Berrangé wrote: > > On Tue, Mar 11, 2025 at 07:59:22PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > > > iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2u

Re: [PATCH 1/1] util/memfd: allow allocating 0 bytes

2025-05-05 Thread Marc-André Lureau
you are trying to solve. > > On Mon, May 5, 2025, 19:55 Marc-André Lureau > wrote: >> >> Hi >> >> On Wed, Mar 26, 2025 at 8:21 PM donno2048 wrote: >> > >> > This silently fixes issues resulting from trying to allocate 0 bytes. >> >

Re: [PATCH 1/1] util/memfd: allow allocating 0 bytes

2025-05-05 Thread Marc-André Lureau
) { > +ptr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, mfd, 0); > +if (ptr == MAP_FAILED) { > +goto err; > +} > +} else { > +ptr = fdopen(mfd, "rw"); I don't understand fdopen() here, it returns a FILE* > } > > *fd = mfd; > -- > 2.30.2 > > -- Marc-André Lureau

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

2025-04-29 Thread Marc-André Lureau
Hi On Tue, Apr 29, 2025 at 6:23 PM Paolo Bonzini wrote: > > > > Il mar 29 apr 2025, 16:03 ha scritto: >> >> From: Marc-André Lureau >> >> Since commit 9859fac ("object: release all props"), the code was changed >> to tracks the already relea

Re: [PATCH v3 6/6] ui/spice: support multi plane dmabuf scanout

2025-04-29 Thread Marc-André Lureau
ad of > bump spice version dependency > > Signed-off-by: Qiang Yu Reviewed-by: Marc-André Lureau (for a single-plane case:) Tested-by: Marc-André Lureau Spice didn't release yet with the new API. It should be okay, but I will wait for the Spice release plan before sen

Re: [PATCH v3 0/6] ui/spice: Enable gl=on option for non-local or remote clients

2025-04-29 Thread Marc-André Lureau
first. (https://patchew.org/QEMU/20250327025848.46962-1-yuq...@gmail.com/) > v2 -> v3: > - Check for errors after invoking glImportMemoryFdEXT() using > glGetError() and report the error to user (Dmitry) > > v1 -> v2: > - Replace the option name preferred-codec with v

Re: [PATCH v3 5/6] ui/spice: Create a new texture with linear layout when gl=on is enabled

2025-04-29 Thread Marc-André Lureau
ure that has a linear memory layout. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Dmitry Osipenko > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off-by: Vivek Kasireddy > --- > ui/spice-display.c | 63 +- > 1

Re: [PATCH v3 4/6] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-04-29 Thread Marc-André Lureau
memory backing the texture has a linear layout is absolutely necessary > in these situations. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Dmitry Osipenko > Cc: Frediano Ziglio > Cc: Dongwon Kim > Signed-off-by: Vivek Kasireddy > --- > include/ui/c

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

2025-04-29 Thread Marc-André Lureau
tely, none of the vnc, spice or dbus protocols provide the refresh rate. I wonder if it would make sense to set it on the GPU.. Perhaps a "max-refresh-rate" device property? > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Dmitry Osipenko > Cc: Frediano Ziglio >

Re: [PATCH v4 8/8] h264: stop gstreamer pipeline before destroying, cleanup on exit

2025-04-28 Thread Marc-André Lureau
ndencies: libsystem_ss.dependencies(), > + dependencies: [libsystem_ss.dependencies(), > pixman], > build_by_default: false) better in system/meson.build > libsystem = declare_dependency(objects: > libsystem.extract_all_objects(recursive: false), >

Re: [PATCH v4 8/8] h264: stop gstreamer pipeline before destroying, cleanup on exit

2025-04-28 Thread Marc-André Lureau
return 0; > } > > +void vnc_cleanup(void) > +{ > +VncDisplay *vd; > + VncState *vs; > + > +QTAILQ_FOREACH(vd, &vnc_displays, next) { > +QTAILQ_FOREACH(vs, &vd->clients, next) { > +#ifdef CONFIG_GSTREAMER > +/* correctly close all h264 encoder pipelines */ > +vnc_h264_clear(vs); > +#endif > +} > +} > +} > + > static void vnc_register_config(void) > { > qemu_add_opts(&qemu_vnc_opts); > -- > 2.39.5 > > -- Marc-André Lureau

Re: [PATCH v4 2/8] vnc: initialize gst during argument processing

2025-04-28 Thread Marc-André Lureau
bool userconfig = true; > FILE *vmstate_dump_file = NULL; > > +#ifdef CONFIG_GSTREAMER > +gst_init(&argc, &argv); > +#endif > + > qemu_add_opts(&qemu_drive_opts); > qemu_add_drive_opts(&qemu_legacy_drive_opts); > qemu_add_drive_opts(&qemu_common_drive_opts); > -- > 2.39.5 > > -- Marc-André Lureau

Re: [PATCH v4 1/8] new configure option to enable gstreamer

2025-04-28 Thread Marc-André Lureau
On Mon, Apr 28, 2025 at 12:07 PM Dietmar Maurer wrote: > > GStreamer is required to implement H264 encoding for VNC. Please note > that QEMU already depends on this library when you enable Spice. > > Signed-off-by: Dietmar Maurer Reviewed-by: Marc-André Lureau >

Re: [PATCH] ui/gtk: Properly apply x/y scale when rendering GL area

2025-04-28 Thread Marc-André Lureau
les before rendering the image fixes this issue. > > Cc: hikalium > Cc: Alexander Orzechowski > Cc: Gerd Hoffmann > Signed-off-by: Weifeng Liu Tested-by: Marc-André Lureau (Hopefully someone has enough motivation to actually understand this change better - otherwise I'

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Marc-André Lureau
Hi On Wed, Apr 23, 2025 at 3:46 PM Dietmar Maurer wrote: > > > On 19.4.2025 07:24 CEST Marc-André Lureau > > wrote: > > > > > > Hi > > > > On Fri, Apr 18, 2025 at 3:41 PM Dietmar Maurer wrote: > > > > > > This patch implements H2

Re: [PATCH v3 9/9] h264: register shutdown notifiers, stop pipeline in destroy_encoder_context

2025-04-22 Thread Marc-André Lureau
Hi On Tue, Apr 22, 2025 at 11:03 AM Dietmar Maurer wrote: > > > > On 22.4.2025 08:39 CEST Marc-André Lureau > > wrote: > > > > > > Hi > > > > On Tue, Apr 22, 2025 at 10:37 AM Dietmar Maurer wrote: > > > > > >

Re: [PATCH v3 9/9] h264: register shutdown notifiers, stop pipeline in destroy_encoder_context

2025-04-21 Thread Marc-André Lureau
cause the Qemu process to hang (CTRL-C does not stop it, only kill -9) Given that h264 code depends on VNC state, can you make VNC close/clean the connection instead? -- Marc-André Lureau

Re: [PATCH v3 5/9] h264: new vnc option to configure h264 at server side

2025-04-21 Thread Marc-André Lureau
Hi On Fri, Apr 18, 2025 at 3:30 PM Dietmar Maurer wrote: > > Values can be 'on', 'off', or a space sparated list of separated > allowed gstreamer encoders. > > - on: automatically select the encoder 'auto' then (default?) > - off: disbale h264 disable 'auto'/'off' but there should be 'on' t

Re: [PATCH v3 9/9] h264: register shutdown notifiers, stop pipeline in destroy_encoder_context

2025-04-21 Thread Marc-André Lureau
Hi On Fri, Apr 18, 2025 at 3:30 PM Dietmar Maurer wrote: > > Some encoders can hang indefinetly (i.e. nvh264enc) if indefinitely > the pipeline is not stopped before it is destroyed > (Observed on Debian bookworm). but why do you need the extra shutdown notifier? > > Signed-off-by: Dietmar Ma

Re: [PATCH v3 8/9] vnc: initialize gst during argument processing

2025-04-21 Thread Marc-André Lureau
Hi On Fri, Apr 18, 2025 at 3:30 PM Dietmar Maurer wrote: > > So that we can set --gst- options on the qemu command line. > > Signed-off-by: Dietmar Maurer Nice, could you move that up in the patch series? As a second patch after linking gst seems fitting. > --- > system/vl.c | 8 > u

Re: [PATCH v3 3/9] vnc: h264: send additional frames after the display is clean

2025-04-18 Thread Marc-André Lureau
This patch modifies the code to send a few additional frames in such > situations to flush the H264 encoder data. > > Signed-off-by: Dietmar Maurer (from v1) Reviewed-by: Marc-André Lureau > --- > ui/vnc.c | 25 - > ui/vnc.h | 3 +++ > 2 files chang

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-18 Thread Marc-André Lureau
; case VNC_ENCODING_DESKTOPRESIZE: > vnc_set_feature(vs, VNC_FEATURE_RESIZE); > break; > @@ -4291,6 +4308,10 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Error > **errp) > Error *local_err = NULL; > char *id = (char *)qemu_opts_id(opts); > > +#ifdef CONFIG_GSTREAMER > +gst_init(NULL, NULL); > +#endif > + > assert(id); > vnc_display_init(id, &local_err); > if (local_err) { > diff --git a/ui/vnc.h b/ui/vnc.h > index acc53a2cc1..a0d336738d 100644 > --- a/ui/vnc.h > +++ b/ui/vnc.h > @@ -46,6 +46,10 @@ > #include "vnc-enc-zrle.h" > #include "ui/kbd-state.h" > > +#ifdef CONFIG_GSTREAMER > +#include > +#endif > + > // #define _VNC_DEBUG 1 > > #ifdef _VNC_DEBUG > @@ -231,6 +235,14 @@ typedef struct VncZywrle { > int buf[VNC_ZRLE_TILE_WIDTH * VNC_ZRLE_TILE_HEIGHT]; > } VncZywrle; > > +#ifdef CONFIG_GSTREAMER > +typedef struct VncH264 { > +GstElement *pipeline, *source, *gst_encoder, *sink, *convert; > +size_t width; > +size_t height; > +} VncH264; > +#endif > + > struct VncRect > { > int x; > @@ -344,6 +356,9 @@ struct VncState > VncHextile hextile; > VncZrle *zrle; > VncZywrle zywrle; > +#ifdef CONFIG_GSTREAMER > +VncH264 *h264; > +#endif > > Notifier mouse_mode_notifier; > > @@ -404,6 +419,7 @@ enum { > #define VNC_ENCODING_TRLE 0x000f > #define VNC_ENCODING_ZRLE 0x0010 > #define VNC_ENCODING_ZYWRLE 0x0011 > +#define VNC_ENCODING_H264 0x0032 /* 50 */ > #define VNC_ENCODING_COMPRESSLEVEL0 0xFF00 /* -256 */ > #define VNC_ENCODING_QUALITYLEVEL00xFFE0 /* -32 */ > #define VNC_ENCODING_XCURSOR 0xFF10 /* -240 */ > @@ -464,6 +480,7 @@ enum VncFeatures { > VNC_FEATURE_XVP, > VNC_FEATURE_CLIPBOARD_EXT, > VNC_FEATURE_AUDIO, > +VNC_FEATURE_H264, > }; > > > @@ -625,6 +642,10 @@ int vnc_zrle_send_framebuffer_update(VncState *vs, int > x, int y, int w, int h); > int vnc_zywrle_send_framebuffer_update(VncState *vs, int x, int y, int w, > int h); > void vnc_zrle_clear(VncState *vs); > > +bool vnc_h264_encoder_init(VncState *vs); > +int vnc_h264_send_framebuffer_update(VncState *vs, int x, int y, int w, int > h); > +void vnc_h264_clear(VncState *vs); > + > /* vnc-clipboard.c */ > void vnc_server_cut_text_caps(VncState *vs); > void vnc_client_cut_text(VncState *vs, size_t len, uint8_t *text); > -- > 2.39.5 > > -- Marc-André Lureau

Re: [PATCH v3 1/9] new configure option to enable gstreamer

2025-04-18 Thread Marc-André Lureau
; @@ -1348,6 +1348,14 @@ if not get_option('zstd').auto() or have_block > required: get_option('zstd'), > method: 'pkg-config') > endif > + > +gstreamer = not_found > +if not get_option('gstreamer').

Re: [PATCH v2 2/6] add vnc h264 encoder

2025-04-15 Thread Marc-André Lureau
Hi On Thu, Apr 10, 2025 at 3:22 PM Dietmar Maurer wrote: > > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software encoder)

Re: [PATCH v2 1/6] new configure option to enable gstreamer

2025-04-15 Thread Marc-André Lureau
; @@ -1348,6 +1348,14 @@ if not get_option('zstd').auto() or have_block > required: get_option('zstd'), > method: 'pkg-config') > endif > + > +gstreamer = not_found > +if not get_option('gstreamer').

Re: [PATCH 3/3] vnc: h264: send additional frames after the display is clean

2025-04-10 Thread Marc-André Lureau
On Mon, Apr 7, 2025 at 3:06 PM Dietmar Maurer wrote: > > So that encoder can improve the picture quality. > > Signed-off-by: Dietmar Maurer Reviewed-by: Marc-André Lureau > --- > ui/vnc.c | 25 - > ui/vnc.h | 3 +++ > 2 files changed, 27 i

Re: [PATCH 2/3] add vnc h264 encoder

2025-04-08 Thread Marc-André Lureau
; > the encoder is present. > > ok. > > > It would also be useful to have an extra VNC > > option like H264=on/off/auto. > > I thought it would be better to do that at the client? Well, it can be worth it to prevent h264 usage from the server too. Or to ensure the server is h264-capable. (this wasn't seen as much necessary for other codecs that are low-resource and/or patent-free, but may make sense too) -- Marc-André Lureau

Re: [PATCH 2/3] add vnc h264 encoder

2025-04-07 Thread Marc-André Lureau
Hi Please resend the series with a cover letter (https://www.qemu.org/docs/master/devel/submitting-a-patch.html#use-git-format-patch) Some people prefer when the commit message has content too :) At least, it would be useful if you point to a client that supports the codec and allow us to test/u

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

2025-04-05 Thread Marc-André Lureau
Well, there isn't much else to say. And there is a Fixes tag. I don't think we have strict rules about commit message, but I am fine adding more context on each commit. Le jeu. 20 mars 2025, 12:39, Prasad Pandit a écrit : > On Tue, 11 Mar 2025 at 21:44, wrote: > > From

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

2025-03-26 Thread Marc-André Lureau
On Wed, Mar 26, 2025 at 1:34 PM wrote: > > From: Qiang Yu > > v2: > * use new dmabuf API and check length > > Signed-off-by: Qiang Yu Reviewed-by: Marc-André Lureau > --- > include/ui/egl-helpers.h | 5 ++- > ui/dbus-listener.c | 19 + &g

Re: [PATCH v2 5/6] ui/dbus: change dbus ScanoutDMABUF interface

2025-03-26 Thread Marc-André Lureau
> > > + > + > + As it may be used with single plane, it is essentially ScanoutDMABUF2, I think we should use that name rather than MultiPlane. > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > 2.43.0 > -- Marc-André Lureau

Re: [PATCH v2 1/6] ui/dmabuf: extend QemuDmaBuf to support multi-plane

2025-03-26 Thread Marc-André Lureau
er with meta data for compression. > > v2: > * change API qemu_dmabuf_get_fd/offset/stride to > qemu_dmabuf_get_fds/offsets/strides. > * change API qemu_dmabuf_dup_fd to qemu_dmabuf_dup_fds. > * add an extra arg to these API for the length of the > array. > > S

Re: [PATCH v2 2/6] ui/egl: require EGL_EXT_image_dma_buf_import_modifiers

2025-03-26 Thread Marc-André Lureau
buf_get_strides(dmabuf, NULL)[0]; > attrs[i++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT; > attrs[i++] = 0; > -#ifdef EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT Maybe we should have in meson.build: if gbm.found() cc.has_header_symbol('epoxy/egl.h', 'EGL_DMA_BUF_PLANE0_MO

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

2025-03-25 Thread Marc-André Lureau
Hi On Wed, Mar 26, 2025 at 5:46 AM Qiang Yu wrote: > > On Mon, Mar 24, 2025 at 10:02 PM Marc-André Lureau > wrote: > > > > On Mon, Mar 24, 2025 at 5:35 PM Qiang Yu wrote: > > > > > > On Mon, Mar 24, 2025 at 5:30 PM Marc-André Lureau > > > wrote

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

2025-03-25 Thread Marc-André Lureau
Hi On Tue, Mar 25, 2025 at 10:52 AM Qiang Yu wrote: > > On Tue, Mar 25, 2025 at 2:37 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Tue, Mar 25, 2025 at 7:26 AM Qiang Yu wrote: > > > > > > On Mon, Mar 24, 2025 at 10:06 PM

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

2025-03-24 Thread Marc-André Lureau
Hi On Tue, Mar 25, 2025 at 7:26 AM Qiang Yu wrote: > > On Mon, Mar 24, 2025 at 10:06 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Mar 24, 2025 at 5:20 PM Qiang Yu wrote: > > > > > > On Mon, Mar 24, 2025 at 6:04 PM

Re: [PATCH] meson.build: Put the D-Bus summary into the UI section

2025-03-24 Thread Marc-André Lureau
On Tue, Mar 25, 2025 at 9:51 AM Thomas Huth wrote: > > From: Thomas Huth > > We've got a dedicated section for UI options nowadays, so the > D-Bus display should get reported here, too. > > Signed-off-by: Thomas Huth Reviewed-by: Marc-André Lureau > --- &g

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

2025-03-24 Thread Marc-André Lureau
Hi On Mon, Mar 24, 2025 at 5:20 PM Qiang Yu wrote: > > On Mon, Mar 24, 2025 at 6:04 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Mar 24, 2025 at 12:19 PM wrote: > > > > > > From: Qiang Yu > > > > > > mesa/ra

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

2025-03-24 Thread Marc-André Lureau
On Mon, Mar 24, 2025 at 5:35 PM Qiang Yu wrote: > > On Mon, Mar 24, 2025 at 5:30 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Mar 24, 2025 at 12:20 PM wrote: > > > > > > From: Qiang Yu > > > > > > Signed-off-by:

Re: [PATCH 2/6] ui/egl: require EGL_EXT_image_dma_buf_import_modifiers

2025-03-24 Thread Marc-André Lureau
Hi On Mon, Mar 24, 2025 at 5:27 PM Qiang Yu wrote: > > On Mon, Mar 24, 2025 at 6:09 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Mon, Mar 24, 2025 at 12:19 PM wrote: > > > > > > From: Qiang Yu > > > > > > It's u

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

2025-03-24 Thread Marc-André Lureau
On Mon, Mar 24, 2025 at 12:19 PM wrote: > > From: Qiang Yu > > 0 is used as DRM_FORMAT_MOD_LINEAR already. > > Signed-off-by: Qiang Yu Reviewed-by: Marc-André Lureau > --- > hw/display/vhost-user-gpu.c | 3 ++- > hw/display/virtio-gpu-udmabuf.c |

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

2025-03-24 Thread Marc-André Lureau
Hi On Mon, Mar 24, 2025 at 12:19 PM wrote: > > From: Qiang Yu > > mesa/radeonsi is going to support explicit midifier which > may export a multi-plane texture. For example, texture with > DCC enabled (a compressed format) has two planes, one with > compressed data, the other with meta data for c

Re: [PATCH 2/6] ui/egl: require EGL_EXT_image_dma_buf_import_modifiers

2025-03-24 Thread Marc-André Lureau
Hi On Mon, Mar 24, 2025 at 12:19 PM wrote: > > From: Qiang Yu > > It's used already, just check it explicitly. > > Signed-off-by: Qiang Yu > --- > ui/egl-helpers.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c > index 72

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

2025-03-24 Thread Marc-André Lureau
> +int fds[DMABUF_MAX_PLANES]; > + > fourcc = qemu_dmabuf_get_fourcc(dmabuf); > y_0_top = qemu_dmabuf_get_y0_top(dmabuf); > -qemu_dmabuf_dup_fd(dmabuf, &fd); > +qemu_dmabuf_dup_fd(dmabuf, fds); > > trace_qemu_spice_gl_forward_dmabuf(ssd->qxl.id, width, height); > /* note: spice server will close the fd, so hand over a dup */ > -spice_qxl_gl_scanout(&ssd->qxl, fd, width, height, > - stride, fourcc, y_0_top); > +spice_qxl_gl_scanout2(&ssd->qxl, fds, width, height, > + qemu_dmabuf_get_offset(dmabuf), > + qemu_dmabuf_get_stride(dmabuf), > + qemu_dmabuf_get_num_planes(dmabuf), > + fourcc, > + qemu_dmabuf_get_modifier(dmabuf), > + y_0_top); > } > qemu_spice_gl_monitor_config(ssd, 0, 0, width, height); > ssd->guest_dmabuf_refresh = false; > -- > 2.43.0 > > -- Marc-André Lureau

Re: [RFC 0/3] Support live migration for qemu-vdagent chardev

2025-03-20 Thread Marc-André Lureau
Hi On Fri, Mar 21, 2025 at 7:40 AM wrote: > > From: Hyman Huang > > Our goal is to migrate VMs that are configured with qemu-vdagent-typed > chardev while allowing the agent to continue working without having > to restart the service in guest. > I sent a more complete series last week: "[PATCH

Re: [PATCH v3 00/14] arm: rework id register storage

2025-03-11 Thread Marc Zyngier
On Tue, 11 Mar 2025 16:28:10 +, Cornelia Huck wrote: > > - I'm open to changing the source of the definitions from the sysregs > file to the JSON definitions published by Arm; however, I first wanted > to get the code using it right -- we can switch out the code generating > the

Re: [PATCH v2 0/5] ui/console-vc: various fixes and improvements

2025-02-26 Thread Marc-André Lureau
> * The VT spec and ECMA-48 standard are somewhat vague about exactly > what attributes should be set for the ICH (insert character), > but various terminal implementations reset the character to the > default state. Instead of inserting a "space" with the current >

Re: [PATCH] chardev: use remoteAddr if the chardev is client

2025-02-25 Thread Marc-André Lureau
((struct sockaddr_un *)(ps))->sun_path); > +} > case AF_INET6: > left = "["; > right = "]"; > -- > 2.48.1 > > This patch doesn't change anything, and I don't understand the problem you are trying to fix. Can you provide more details or a test scenario? thanks -- Marc-André Lureau

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

2025-02-23 Thread Marc-André Lureau
ect outside the scrolling margins" [2]. > > Without these commands console is barely usable. > > [1] https://vt100.net/docs/vt510-rm/DCH.html > [1] https://vt100.net/docs/vt510-rm/ICH.html > > Signed-off-by: Roman Penyaev > Cc: "Marc-André Lureau" > Cc: qem

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

2025-02-17 Thread Marc-André Lureau
Hi On Mon, Feb 17, 2025 at 3:16 PM wrote: > > From: Marc-André Lureau > > Fix SDL backend compilation for win32. > > Fixes: commit 31287d1af4 ("ui/sdl2: Implement dpy dmabuf functions") Pierre-Eric, I realize this is not yet upstream. Can you update your patch? than

Re: [PATCH 14/15] arm/cpu: Add sysreg generation scripts

2025-02-07 Thread Marc Zyngier
On Fri, 07 Feb 2025 11:02:47 +, Cornelia Huck wrote: > > From: Eric Auger > > Introduce scripts that automate the generation of system register > definitions from a given linux source tree arch/arm64/tools/sysreg. > > Invocation of > ./update-aarch64-sysreg-code.sh $PATH_TO_LINUX_SOURCE_TR

Re: [PATCH] dbus: add -audio dbus nsamples option

2025-02-05 Thread Marc-André Lureau
Hi On Wed, Feb 5, 2025 at 12:33 PM Markus Armbruster wrote: > > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Allow to set the number of audio samples per read/write to dbus. > > > > Signed-off-by: Marc-André Lureau

Re: [PULL 0/8] Ui patches

2025-02-03 Thread Marc-André Lureau
Hi On Mon, Feb 3, 2025 at 6:29 PM Stefan Hajnoczi wrote: > > On Mon, Feb 3, 2025 at 7:58 AM wrote: > > > > From: Marc-André Lureau > > > > The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586: > > > > Merge tag 'block-pu

Re: [PATCH v8 0/4] chardev: implement backend chardev multiplexing

2025-01-21 Thread Marc-André Lureau
; v2 .. v3: > > * Split frontend and backend multiplexer implementations and > move them to separate files: char-mux-fe.c and char-mux-be.c > > v1 .. v2: > > * Separate type for the backend multiplexer `mux-be` > * Handle EAGAIN on write to the backend device &g

Re: [PATCH 2/2] docs/cpu-features: Update "PAuth" (Pointer Authentication) details

2025-01-18 Thread Marc Zyngier
The host CPU > will choose the cryptographic algorithm. > > - For TCG, however, along with `pauth`, a couple of properties can be > controlled -- they're are related to cryptographic algorithm choice. > > Thanks to Peter Maydell and Marc Zyngier for explaining m

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

2025-01-14 Thread Marc-André Lureau
Hi On Tue, Jan 14, 2025 at 8:00 PM Pierrick Bouvier wrote: > > On 1/14/25 02:48, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > ../contrib/plugins/cache.c:638:9: error: ‘l2_cache’ may be used > > uninitialized [-Werror=m

  1   2   3   4   5   6   7   8   9   10   >