ui: better console hotplug support
Get series with b4
b4 am [email protected] change-id 20260529-b4-ui-909bfa695735Versions newest first
- v4 Latest34 patches 3 repliesIn review
- v335 patches 6 repliesSuperseded
- v233 patches 21 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 32 patches | 6 replies | Superseded |
Changes in v4 from the cover letter
- call vfio_display_exit() in vfio_pci_realize() error path
- drop resetting gl ctxt to NULL on dbus console dispose (incorrect)
- add mdpy doc suggestions from Cédric
- rebased
- Link to v3: https://lore.kernel.org/qemu-devel/[email protected]
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/34 | ui/gtk: fix bad widget realize on non-GFX VCui/ | +3 | 0 replies | |
| 2/34 | build-sys: build with -fno-omit-frame-pointer with ASANmeson.build | +2 | 0 replies | |
| 3/34 | irq: add per-IRQ observer to fix qemu_irq_intercept_in leakhw/ include/ scripts/ +1 more | +10 | 0 replies | |
| 4/34 | scripts/lsan_suppressions: suppress fontconfig leaksscripts/ | +4 | 0 replies | |
| 5/34 | vfio/pci: close display console during unrealize, not finalizeMAINTAINERS hw/ hw/ +1 more | +21 | 0 replies | |
| 6/34 | docs: add mdpy mdev vfio display testing guidedocs/ docs/ | +91 | 1 reply | |
| 7/34 | glib-compat: add fallback for g_clear_fd/g_autofdinclude/ | +29 | 0 replies | |
| 8/34 | util: make notifer_remove() saferutil/ | +1 | 0 replies | |
| 9/34 | ui/dbus: remove mouse handler on disposeui/ | +1 | 0 replies | |
| 10/34 | ui/qmp: keep a reference of console across yieldui/ | +3 | 0 replies | |
| 11/34 | ui: stop ui timer when closingui/ | +1 | 0 replies | |
| 12/34 | ui/console: init gl_unblock_timer in qemu_console_initui/ | +2 | 0 replies | |
| 13/34 | ui/spice: remove dead spice_displaysinclude/ | +0 | 0 replies | |
| 14/34 | ui/spice: add cleanup on shutdowninclude/ include/ scripts/ +6 more | +129 | 0 replies | |
| 15/34 | ui: add display cleanup infrastructureinclude/ system/ ui/ | +22 | 0 replies | |
| 16/34 | ui/curses: implement display cleanupui/ | +12 | 0 replies | |
| 17/34 | ui/sdl2: implement display cleanupui/ | +19 | 0 replies | |
| 18/34 | ui/spice-app: implement display cleanupui/ | +5 | 0 replies | |
| 19/34 | ui/egl: implement display and EGL cleanupinclude/ ui/ ui/ | +51 | 0 replies | |
| 20/34 | ui/cocoa: implement display cleanupui/ | +17 | 1 reply | |
| 21/34 | ui/dbus: implement display cleanupui/ | +13 | 0 replies | |
| 22/34 | ui/gtk: implement display cleanupinclude/ ui/ ui/ | +36 | 0 replies | |
| 23/34 | ui/console: add console event notifier infrastructureinclude/ ui/ | +41 | 0 replies | |
| 24/34 | ui/console: fire console ADDED/REMOVED notificationsui/ | +2 | 0 replies | |
| 25/34 | ui/console-vc: fire ADDED/REMOVED notificationsui/ | +13 | 0 replies | |
| 26/34 | ui/gtk: convert VirtualConsole storage from fixed array to GPtrArrayinclude/ ui/ | +87 | 0 replies | |
| 27/34 | ui/gtk: move global display settings out of per-console initui/ | +23 | 0 replies | |
| 28/34 | ui/gtk: fix tab re-insertion order on window closeui/ | +24 | 0 replies | |
| 29/34 | ui/gtk: centralize console menu and shortcut managementinclude/ ui/ | +85 | 0 replies | |
| 30/34 | ui/gtk: handle console hotplug/unplug eventsinclude/ ui/ | +75 | 0 replies | |
| 31/34 | ui/console: register console in QOM tree dynamicallyui/ | +17 | 0 replies | |
| 32/34 | ui/console: unregister console from QOM tree on closeui/ | +4 | 0 replies | |
| 33/34 | ui/dbus: handle console hotplug/unplug eventsui/ ui/ ui/ | +84 | 0 replies | |
| 34/34 | tests/qtest: add D-Bus display hotplug testtests/ | +99 | 0 replies |
Reviews trailers per patch
15 of 34 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Daniel P. Berrangé | Fabiano Rosas | Philippe Mathieu-Daudé | Cédric Le Goater | Akihiko Odaki |
|---|---|---|---|---|---|
| Series | R-b | ||||
| 1/34 | R-b | ||||
| 2/34 | R-b | ||||
| 3/34 | R-b | R-b | |||
| 4/34 | R-b | ||||
| 5/34 | A-b | ||||
| 6/34 | R-b | ||||
| 7/34 | R-b | ||||
| 8/34 | |||||
| 9/34 | R-b | ||||
| 10/34 | R-b | ||||
| 11/34 | R-b | ||||
| 12/34 | R-b | ||||
| 13/34 | R-b | ||||
| 14/34 | R-b | ||||
| 15/34 | |||||
| 16/34 | |||||
| 17/34 | |||||
| 18/34 | |||||
| 19/34 | |||||
| 20/34 | T-b | ||||
| 21/34 | |||||
| 22/34 | |||||
| 23/34 | |||||
| 24/34 | |||||
| 25/34 | |||||
| 26/34 | |||||
| 27/34 | |||||
| 28/34 | R-b | ||||
| 29/34 | |||||
| 30/34 | |||||
| 31/34 | |||||
| 32/34 | |||||
| 33/34 | |||||
| 34/34 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v4 00/34] ui: better console hotplug support
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
---
Changes in v4:
- call vfio_display_exit() in vfio_pci_realize() error path
- drop resetting gl ctxt to NULL on dbus console dispose (incorrect)
- add mdpy doc suggestions from Cédric
- rebased
- Link to v3: https://lore.kernel.org/qemu-devel/[email protected]
Changes in v3:
- added "docs: start a vfio-pci document" patch
- gtk: some cleanup order fixes in gd_vc_free()
- gtk: drop unwanted show-tabs on console-add
- added "util: make notifer_remove() safer"
- made dbus led handler removal idempotent
- vfio: close dmabufs before closing console
- vfio: removed bad set_display_gl_ctx(NULL) call
- vfio: fixed dpy->region exit/finalize with pre-check
- fix console registration after x-exit-preconfig
- rebased & collected patch trailers
- Link to v2: https://lore.kernel.org/qemu-devel/[email protected]
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/[email protected]
To: [email protected]
Cc: Marc-André Lureau <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: "Daniel P. Berrangé" <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>
Cc: Pierrick Bouvier <[email protected]>
Cc: Fabiano Rosas <[email protected]>
Cc: Laurent Vivier <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Cédric Le Goater <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Akihiko Odaki <[email protected]>
---
Marc-André Lureau (34):
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
docs: add mdpy mdev vfio display testing guide
glib-compat: add fallback for g_clear_fd/g_autofd
util: make notifer_remove() safer
ui/dbus: remove mouse handler on dispose
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
MAINTAINERS | 1 + docs/devel/index-internals.rst | 1 + docs/devel/vfio-mdpy.rst | 90 ++++++++++ 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 | 7 +- 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 | 29 ++-- hw/vfio/pci.c | 2 + system/qtest.c | 5 +- system/runstate.c | 4 +- tests/qtest/dbus-display-test.c | 101 ++++++++++- ui/console-vc.c | 13 ++ ui/console.c | 77 ++++++++- ui/curses.c | 17 +- ui/dbus-console.c | 6 + ui/dbus.c | 106 ++++++++++-- ui/egl-headless.c | 31 ++++ ui/egl-helpers.c | 19 ++ ui/gtk-clipboard.c | 15 ++ ui/gtk.c | 375 +++++++++++++++++++++++++++++++--------- ui/sdl2.c | 23 ++- ui/spice-app.c | 10 +- ui/spice-core.c | 25 ++- ui/spice-display.c | 52 ++++++ ui/spice-input.c | 53 ++++-- ui/spice-module.c | 5 + ui/ui-qmp-cmds.c | 3 + util/notify.c | 2 +- scripts/lsan_suppressions.txt | 15 +- ui/cocoa.m | 19 +- ui/meson.build | 4 +- 39 files changed, 1005 insertions(+), 189 deletions(-)
---
base-commit: b83371668192a705b878e909c5ae9c1233cbd5fb
change-id: 20260529-b4-ui-909bfa695735
Best regards,
Signature · 1 line
Marc-André Lureau <[email protected]>