All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/33] ui: better console hotplug support
@ 2026-06-08  7:16 Marc-André Lureau
  2026-06-08  7:16 ` [PATCH v2 01/33] ui/gtk: fix bad widget realize on non-GFX VC Marc-André Lureau
                   ` (32 more replies)
  0 siblings, 33 replies; 45+ messages in thread
From: Marc-André Lureau @ 2026-06-08  7:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Daniel P. Berrangé,
	Philippe Mathieu-Daudé, Pierrick Bouvier, Fabiano Rosas,
	Laurent Vivier, Alex Williamson, Cédric Le Goater,
	Peter Maydell, Akihiko Odaki, Marc-André Lureau

Hi,

This series improves handling of dynamic consoles in ui/ (commit
9588d67e72 "console: minimal hotplug suport" added basic unplug &
replug).  It allows for better hotplug of vfio-pci display devices or
bochs-display (the other device supporting hotplug today), with GTK and
D-Bus backends.

As usual, the first patches are various preliminary cleanups and fixes I
hit while developping the rest, they could be merged earlier. I improved
the display cleanup to replace the scattered atexit() handler, making
leaks more visible to sanitizers.

Then console ADDED/REMOVED notifications are added, so display backends
can react to hotplug. The GTK code is rework a bit to allow easier
hotplug events handling. Finally, D-Bus supports is implemented with a
qtest to exercise it.

thanks

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
Changes in v2:
- add "ui/dbus: remove led handler", suggested by Akihiko
- fix compilation with -Dvte=disabled
- rebased, collect trailers
- Link to v1: https://lore.kernel.org/qemu-devel/20260529-b4-ui-v1-0-8db3068421ef@redhat.com

To: qemu-devel@nongnu.org
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@mailo.com>
Cc: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: Fabiano Rosas <farosas@suse.de>
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Alex Williamson <alex@shazbot.org>
Cc: Cédric Le Goater <clg@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>

---
Marc-André Lureau (33):
      ui/gtk: fix bad widget realize on non-GFX VC
      build-sys: build with -fno-omit-frame-pointer with ASAN
      irq: add per-IRQ observer to fix qemu_irq_intercept_in leak
      scripts/lsan_suppressions: suppress fontconfig leaks
      vfio/pci: close display console during unrealize, not finalize
      glib-compat: add fallback for g_clear_fd/g_autofd
      ui/dbus: remove mouse handler on dispose
      ui/dbus: remove led handler
      ui/qmp: keep a reference of console across yield
      ui: stop ui timer when closing
      ui/console: init gl_unblock_timer in qemu_console_init
      ui/spice: remove dead spice_displays
      ui/spice: add cleanup on shutdown
      ui: add display cleanup infrastructure
      ui/curses: implement display cleanup
      ui/sdl2: implement display cleanup
      ui/spice-app: implement display cleanup
      ui/egl: implement display and EGL cleanup
      ui/cocoa: implement display cleanup
      ui/dbus: implement display cleanup
      ui/gtk: implement display cleanup
      ui/console: add console event notifier infrastructure
      ui/console: fire console ADDED/REMOVED notifications
      ui/console-vc: fire ADDED/REMOVED notifications
      ui/gtk: convert VirtualConsole storage from fixed array to GPtrArray
      ui/gtk: move global display settings out of per-console init
      ui/gtk: fix tab re-insertion order on window close
      ui/gtk: centralize console menu and shortcut management
      ui/gtk: handle console hotplug/unplug events
      ui/console: register console in QOM tree dynamically
      ui/console: unregister console from QOM tree on close
      ui/dbus: handle console hotplug/unplug events
      tests/qtest: add D-Bus display hotplug test

 meson.build                     |   2 +
 hw/vfio/pci.h                   |   1 +
 include/glib-compat.h           |  29 ++++
 include/hw/core/irq.h           |   6 +-
 include/ui/console.h            |  20 +++
 include/ui/egl-helpers.h        |   1 +
 include/ui/gtk.h                |   6 +-
 include/ui/qemu-spice-module.h  |   1 +
 include/ui/qemu-spice.h         |   9 +-
 ui/dbus.h                       |   3 +
 hw/core/irq.c                   |  12 +-
 hw/vfio/display.c               |  30 ++--
 hw/vfio/pci.c                   |   1 +
 system/qtest.c                  |   5 +-
 system/runstate.c               |   4 +-
 tests/qtest/dbus-display-test.c | 101 ++++++++++-
 ui/console-vc.c                 |  13 ++
 ui/console.c                    |  71 +++++++-
 ui/curses.c                     |  17 +-
 ui/dbus-console.c               |  14 +-
 ui/dbus.c                       | 106 ++++++++++--
 ui/egl-headless.c               |  31 ++++
 ui/egl-helpers.c                |  19 +++
 ui/gtk-clipboard.c              |  15 ++
 ui/gtk.c                        | 369 +++++++++++++++++++++++++++++++---------
 ui/sdl2.c                       |  23 ++-
 ui/spice-app.c                  |  10 +-
 ui/spice-core.c                 |  25 ++-
 ui/spice-display.c              |  52 ++++++
 ui/spice-input.c                |  52 ++++--
 ui/spice-module.c               |   5 +
 ui/ui-qmp-cmds.c                |   3 +
 scripts/lsan_suppressions.txt   |  15 +-
 ui/cocoa.m                      |  19 ++-
 ui/meson.build                  |   4 +-
 35 files changed, 909 insertions(+), 185 deletions(-)
---
base-commit: 3390aba56c354637eccd2d5ab5fd6efc2f026f06
change-id: 20260529-b4-ui-909bfa695735

Best regards,
--  
Marc-André Lureau <marcandre.lureau@redhat.com>



^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2026-06-08 12:51 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08  7:16 [PATCH v2 00/33] ui: better console hotplug support Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 01/33] ui/gtk: fix bad widget realize on non-GFX VC Marc-André Lureau
2026-06-08  8:56   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 02/33] build-sys: build with -fno-omit-frame-pointer with ASAN Marc-André Lureau
2026-06-08  8:58   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 03/33] irq: add per-IRQ observer to fix qemu_irq_intercept_in leak Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 04/33] scripts/lsan_suppressions: suppress fontconfig leaks Marc-André Lureau
2026-06-08  9:09   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 05/33] vfio/pci: close display console during unrealize, not finalize Marc-André Lureau
2026-06-08 12:50   ` Cédric Le Goater
2026-06-08  7:16 ` [PATCH v2 06/33] glib-compat: add fallback for g_clear_fd/g_autofd Marc-André Lureau
2026-06-08  9:11   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 07/33] ui/dbus: remove mouse handler on dispose Marc-André Lureau
2026-06-08  9:12   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 08/33] ui/dbus: remove led handler Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 09/33] ui/qmp: keep a reference of console across yield Marc-André Lureau
2026-06-08  9:16   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 10/33] ui: stop ui timer when closing Marc-André Lureau
2026-06-08  9:16   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 11/33] ui/console: init gl_unblock_timer in qemu_console_init Marc-André Lureau
2026-06-08  9:17   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 12/33] ui/spice: remove dead spice_displays Marc-André Lureau
2026-06-08  9:18   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 13/33] ui/spice: add cleanup on shutdown Marc-André Lureau
2026-06-08  9:42   ` Daniel P. Berrangé
2026-06-08  7:16 ` [PATCH v2 14/33] ui: add display cleanup infrastructure Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 15/33] ui/curses: implement display cleanup Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 16/33] ui/sdl2: " Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 17/33] ui/spice-app: " Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 18/33] ui/egl: implement display and EGL cleanup Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 19/33] ui/cocoa: implement display cleanup Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 20/33] ui/dbus: " Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 21/33] ui/gtk: " Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 22/33] ui/console: add console event notifier infrastructure Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 23/33] ui/console: fire console ADDED/REMOVED notifications Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 24/33] ui/console-vc: fire " Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 25/33] ui/gtk: convert VirtualConsole storage from fixed array to GPtrArray Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 26/33] ui/gtk: move global display settings out of per-console init Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 27/33] ui/gtk: fix tab re-insertion order on window close Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 28/33] ui/gtk: centralize console menu and shortcut management Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 29/33] ui/gtk: handle console hotplug/unplug events Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 30/33] ui/console: register console in QOM tree dynamically Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 31/33] ui/console: unregister console from QOM tree on close Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 32/33] ui/dbus: handle console hotplug/unplug events Marc-André Lureau
2026-06-08  7:16 ` [PATCH v2 33/33] tests/qtest: add D-Bus display hotplug test Marc-André Lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.