[PULL v2 00/38] Ui patches

marcandre.lureau@redhat.com posted 38 patches 1 week, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260521135551.1752945-1-marcandre.lureau@redhat.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jan Kiszka <jan.kiszka@web.de>, Peter Maydell <peter.maydell@linaro.org>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Thomas Huth <th.huth+qemu@posteo.eu>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
There is a newer version of this series
include/qemu/typedefs.h      |   1 +
include/system/replay.h      |   2 +-
include/ui/console.h         |   3 +-
include/ui/input.h           |  92 ++++++-----
include/ui/kbd-state.h       |  12 +-
replay/replay-internal.h     |   6 +-
ui/vnc.h                     |   4 +-
ui/x_keymap.h                |   3 +-
chardev/msmouse.c            |  12 +-
chardev/wctablet.c           |  10 +-
hw/arm/musicpal.c            |  31 ++--
hw/char/escc.c               |  45 +++---
hw/display/xenfb.c           |  51 ++-----
hw/input/adb-kbd.c           | 246 +++++++++++++++--------------
hw/input/adb-mouse.c         |  22 ++-
hw/input/hid.c               |  41 +++--
hw/input/ps2.c               | 118 +++++++-------
hw/input/stellaris_gamepad.c |  11 +-
hw/input/virtio-input-hid.c  |  89 ++++++-----
hw/m68k/next-kbd.c           | 128 ++++++++--------
qemu-keymap.c                |  41 +++--
replay/replay-events.c       |   6 +-
replay/replay-input.c        | 117 +++++---------
replay/replay.c              |   2 +-
replay/stubs-system.c        |   2 +-
tools/qemu-vnc/input.c       |   9 +-
ui/console.c                 |  62 +++++---
ui/dbus-console.c            |   8 +-
ui/gtk.c                     |  55 ++++---
ui/input-barrier.c           |  26 ++--
ui/input-keymap.c            |  74 +++++----
ui/input-legacy.c            |  47 ++----
ui/input-linux.c             |   3 +-
ui/input.c                   | 214 ++++++++++++--------------
ui/kbd-state.c               |  61 ++++----
ui/keymaps.c                 |   4 +-
ui/sdl2-input.c              |  17 ++-
ui/spice-input.c             |   3 +-
ui/vdagent.c                 |  20 +--
ui/vnc-auth-sasl.c           |   2 +
ui/vnc-clipboard.c           |   9 +-
ui/vnc.c                     |  41 ++---
ui/vt100.c                   |  11 +-
ui/x_keymap.c                |  24 +--
hw/input/trace-events        |   2 +-
tools/qemu-vnc/trace-events  |   2 +-
ui/cocoa.m                   | 289 ++++++++++++++++++-----------------
ui/meson.build               |  29 ++--
ui/trace-events              |   5 +-
49 files changed, 1014 insertions(+), 1098 deletions(-)
[PULL v2 00/38] Ui patches
Posted by marcandre.lureau@redhat.com 1 week, 2 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit 3f129ea545f16e82b5e43fcc3866b134b7cc4dfc:

  Merge tag 'pull-vfio-20260520' of https://github.com/legoater/qemu into staging (2026-05-20 16:53:28 -0400)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request

for you to fetch changes up to 95df9ffa98a785e4e9368018a72e643e77328ed1:

  ui/gtk: Fix focus loss on re-attachment with single VC (2026-05-21 17:53:43 +0400)

----------------------------------------------------------------
UI pull request

- ui/input: Decouple internal and QAPI input events
- VNC OOB fixes
- vt100 fixes
- GTK focus fix

----------------------------------------------------------------

Akihiko Odaki (29):
  ui/input: Introduce QemuInputEvent typedef
  ui/input: Remove QAPI wrappers from QemuInputEvent
  ui/input: Store QKeyCode directly in QemuInputKeyEvent
  ui/input: Use Linux key codes for internal key events
  ui/input: Prohibit sending KEY_RESERVED
  ui/console: Add qemu_text_console_put_linux()
  ui/kbd-state: Use Linux key codes
  hw/arm/musicpal: Use Linux key codes
  hw/char/escc: Use Linux key codes
  hw/display/xenfb: Use Linux key codes
  hw/input/adb-kbd: Use Linux key codes
  hw/input/hid: Use Linux key codes
  hw/input/ps2: Use Linux key codes
  hw/input/virtio-input: Use Linux key codes
  hw/m68k/next-kbd: Use Linux key codes
  replay: Use Linux key codes
  ui/cocoa: Use Linux key codes
  ui/dbus: Use Linux key codes
  ui/gtk: Use Linux key codes
  ui/input-barrier: Use Linux key codes
  ui/input-legacy: Use Linux key codes
  ui/input-linux: Use Linux key codes
  ui/keymaps: Use Linux key codes
  ui/sdl2: Use Linux key codes
  ui/spice: Use Linux key codes
  ui/vnc: Use Linux key codes
  qemu-keymap: Use Linux key codes
  ui/console: Remove qemu_text_console_put_qcode()
  ui/input: Remove unused QKeyCode helpers and keymaps

Daniel P. Berrangé (4):
  ui/vnc: fix OOB read access in VNC SASL mechname array
  ui/vnc: fix OOB write in VNC stats array
  ui/vnc: fix OOB write in lossy rect worker code
  ui/vnc: fix OOB read updating VNC update frequency stats

Dongwon Kim (1):
  ui/gtk: Fix focus loss on re-attachment with single VC

Heechan Kang (1):
  ui: fix validation of VNC extended clipboard data length

Marc-André Lureau (1):
  ui/vt100: add vt100_fini() check

Peter Maydell (2):
  ui/vt100: Standardize on uint8_t for "ch" byte variables
  ui/vt100: Take byte as uint8_t in bh_utf8_decode()

 include/qemu/typedefs.h      |   1 +
 include/system/replay.h      |   2 +-
 include/ui/console.h         |   3 +-
 include/ui/input.h           |  92 ++++++-----
 include/ui/kbd-state.h       |  12 +-
 replay/replay-internal.h     |   6 +-
 ui/vnc.h                     |   4 +-
 ui/x_keymap.h                |   3 +-
 chardev/msmouse.c            |  12 +-
 chardev/wctablet.c           |  10 +-
 hw/arm/musicpal.c            |  31 ++--
 hw/char/escc.c               |  45 +++---
 hw/display/xenfb.c           |  51 ++-----
 hw/input/adb-kbd.c           | 246 +++++++++++++++--------------
 hw/input/adb-mouse.c         |  22 ++-
 hw/input/hid.c               |  41 +++--
 hw/input/ps2.c               | 118 +++++++-------
 hw/input/stellaris_gamepad.c |  11 +-
 hw/input/virtio-input-hid.c  |  89 ++++++-----
 hw/m68k/next-kbd.c           | 128 ++++++++--------
 qemu-keymap.c                |  41 +++--
 replay/replay-events.c       |   6 +-
 replay/replay-input.c        | 117 +++++---------
 replay/replay.c              |   2 +-
 replay/stubs-system.c        |   2 +-
 tools/qemu-vnc/input.c       |   9 +-
 ui/console.c                 |  62 +++++---
 ui/dbus-console.c            |   8 +-
 ui/gtk.c                     |  55 ++++---
 ui/input-barrier.c           |  26 ++--
 ui/input-keymap.c            |  74 +++++----
 ui/input-legacy.c            |  47 ++----
 ui/input-linux.c             |   3 +-
 ui/input.c                   | 214 ++++++++++++--------------
 ui/kbd-state.c               |  61 ++++----
 ui/keymaps.c                 |   4 +-
 ui/sdl2-input.c              |  17 ++-
 ui/spice-input.c             |   3 +-
 ui/vdagent.c                 |  20 +--
 ui/vnc-auth-sasl.c           |   2 +
 ui/vnc-clipboard.c           |   9 +-
 ui/vnc.c                     |  41 ++---
 ui/vt100.c                   |  11 +-
 ui/x_keymap.c                |  24 +--
 hw/input/trace-events        |   2 +-
 tools/qemu-vnc/trace-events  |   2 +-
 ui/cocoa.m                   | 289 ++++++++++++++++++-----------------
 ui/meson.build               |  29 ++--
 ui/trace-events              |   5 +-
 49 files changed, 1014 insertions(+), 1098 deletions(-)

-- 
2.54.0


Re: [PULL v2 00/38] Ui patches
Posted by Stefan Hajnoczi 5 days, 20 hours ago
On Thu, May 21, 2026 at 9:56 AM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The following changes since commit 3f129ea545f16e82b5e43fcc3866b134b7cc4dfc:
>
>   Merge tag 'pull-vfio-20260520' of https://github.com/legoater/qemu into staging (2026-05-20 16:53:28 -0400)
>
> are available in the Git repository at:
>
>   https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
>
> for you to fetch changes up to 95df9ffa98a785e4e9368018a72e643e77328ed1:
>
>   ui/gtk: Fix focus loss on re-attachment with single VC (2026-05-21 17:53:43 +0400)
>
> ----------------------------------------------------------------
> UI pull request
>
> - ui/input: Decouple internal and QAPI input events
> - VNC OOB fixes
> - vt100 fixes
> - GTK focus fix
>
> ----------------------------------------------------------------
>
> Akihiko Odaki (29):
>   ui/input: Introduce QemuInputEvent typedef
>   ui/input: Remove QAPI wrappers from QemuInputEvent
>   ui/input: Store QKeyCode directly in QemuInputKeyEvent
>   ui/input: Use Linux key codes for internal key events
>   ui/input: Prohibit sending KEY_RESERVED
>   ui/console: Add qemu_text_console_put_linux()
>   ui/kbd-state: Use Linux key codes
>   hw/arm/musicpal: Use Linux key codes
>   hw/char/escc: Use Linux key codes
>   hw/display/xenfb: Use Linux key codes
>   hw/input/adb-kbd: Use Linux key codes
>   hw/input/hid: Use Linux key codes
>   hw/input/ps2: Use Linux key codes
>   hw/input/virtio-input: Use Linux key codes
>   hw/m68k/next-kbd: Use Linux key codes
>   replay: Use Linux key codes

Please take a look at this replay failure:
https://gitlab.com/qemu-project/qemu/-/jobs/14521293731#L842

If the issue is caused by this pull request, please resend with a fix.

If the issue is not caused by this pull request, please let me know. Thanks!

Stefan

>   ui/cocoa: Use Linux key codes
>   ui/dbus: Use Linux key codes
>   ui/gtk: Use Linux key codes
>   ui/input-barrier: Use Linux key codes
>   ui/input-legacy: Use Linux key codes
>   ui/input-linux: Use Linux key codes
>   ui/keymaps: Use Linux key codes
>   ui/sdl2: Use Linux key codes
>   ui/spice: Use Linux key codes
>   ui/vnc: Use Linux key codes
>   qemu-keymap: Use Linux key codes
>   ui/console: Remove qemu_text_console_put_qcode()
>   ui/input: Remove unused QKeyCode helpers and keymaps
>
> Daniel P. Berrangé (4):
>   ui/vnc: fix OOB read access in VNC SASL mechname array
>   ui/vnc: fix OOB write in VNC stats array
>   ui/vnc: fix OOB write in lossy rect worker code
>   ui/vnc: fix OOB read updating VNC update frequency stats
>
> Dongwon Kim (1):
>   ui/gtk: Fix focus loss on re-attachment with single VC
>
> Heechan Kang (1):
>   ui: fix validation of VNC extended clipboard data length
>
> Marc-André Lureau (1):
>   ui/vt100: add vt100_fini() check
>
> Peter Maydell (2):
>   ui/vt100: Standardize on uint8_t for "ch" byte variables
>   ui/vt100: Take byte as uint8_t in bh_utf8_decode()
>
>  include/qemu/typedefs.h      |   1 +
>  include/system/replay.h      |   2 +-
>  include/ui/console.h         |   3 +-
>  include/ui/input.h           |  92 ++++++-----
>  include/ui/kbd-state.h       |  12 +-
>  replay/replay-internal.h     |   6 +-
>  ui/vnc.h                     |   4 +-
>  ui/x_keymap.h                |   3 +-
>  chardev/msmouse.c            |  12 +-
>  chardev/wctablet.c           |  10 +-
>  hw/arm/musicpal.c            |  31 ++--
>  hw/char/escc.c               |  45 +++---
>  hw/display/xenfb.c           |  51 ++-----
>  hw/input/adb-kbd.c           | 246 +++++++++++++++--------------
>  hw/input/adb-mouse.c         |  22 ++-
>  hw/input/hid.c               |  41 +++--
>  hw/input/ps2.c               | 118 +++++++-------
>  hw/input/stellaris_gamepad.c |  11 +-
>  hw/input/virtio-input-hid.c  |  89 ++++++-----
>  hw/m68k/next-kbd.c           | 128 ++++++++--------
>  qemu-keymap.c                |  41 +++--
>  replay/replay-events.c       |   6 +-
>  replay/replay-input.c        | 117 +++++---------
>  replay/replay.c              |   2 +-
>  replay/stubs-system.c        |   2 +-
>  tools/qemu-vnc/input.c       |   9 +-
>  ui/console.c                 |  62 +++++---
>  ui/dbus-console.c            |   8 +-
>  ui/gtk.c                     |  55 ++++---
>  ui/input-barrier.c           |  26 ++--
>  ui/input-keymap.c            |  74 +++++----
>  ui/input-legacy.c            |  47 ++----
>  ui/input-linux.c             |   3 +-
>  ui/input.c                   | 214 ++++++++++++--------------
>  ui/kbd-state.c               |  61 ++++----
>  ui/keymaps.c                 |   4 +-
>  ui/sdl2-input.c              |  17 ++-
>  ui/spice-input.c             |   3 +-
>  ui/vdagent.c                 |  20 +--
>  ui/vnc-auth-sasl.c           |   2 +
>  ui/vnc-clipboard.c           |   9 +-
>  ui/vnc.c                     |  41 ++---
>  ui/vt100.c                   |  11 +-
>  ui/x_keymap.c                |  24 +--
>  hw/input/trace-events        |   2 +-
>  tools/qemu-vnc/trace-events  |   2 +-
>  ui/cocoa.m                   | 289 ++++++++++++++++++-----------------
>  ui/meson.build               |  29 ++--
>  ui/trace-events              |   5 +-
>  49 files changed, 1014 insertions(+), 1098 deletions(-)
>
> --
> 2.54.0
>
Re: [PULL v2 00/38] Ui patches
Posted by Marc-André Lureau 5 days, 19 hours ago
Hi

On Mon, May 25, 2026 at 12:31 AM Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
> On Thu, May 21, 2026 at 9:56 AM <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > The following changes since commit 3f129ea545f16e82b5e43fcc3866b134b7cc4dfc:
> >
> >   Merge tag 'pull-vfio-20260520' of https://github.com/legoater/qemu into staging (2026-05-20 16:53:28 -0400)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
> >
> > for you to fetch changes up to 95df9ffa98a785e4e9368018a72e643e77328ed1:
> >
> >   ui/gtk: Fix focus loss on re-attachment with single VC (2026-05-21 17:53:43 +0400)
> >
> > ----------------------------------------------------------------
> > UI pull request
> >
> > - ui/input: Decouple internal and QAPI input events
> > - VNC OOB fixes
> > - vt100 fixes
> > - GTK focus fix
> >
> > ----------------------------------------------------------------
> >
> > Akihiko Odaki (29):
> >   ui/input: Introduce QemuInputEvent typedef
> >   ui/input: Remove QAPI wrappers from QemuInputEvent
> >   ui/input: Store QKeyCode directly in QemuInputKeyEvent
> >   ui/input: Use Linux key codes for internal key events
> >   ui/input: Prohibit sending KEY_RESERVED
> >   ui/console: Add qemu_text_console_put_linux()
> >   ui/kbd-state: Use Linux key codes
> >   hw/arm/musicpal: Use Linux key codes
> >   hw/char/escc: Use Linux key codes
> >   hw/display/xenfb: Use Linux key codes
> >   hw/input/adb-kbd: Use Linux key codes
> >   hw/input/hid: Use Linux key codes
> >   hw/input/ps2: Use Linux key codes
> >   hw/input/virtio-input: Use Linux key codes
> >   hw/m68k/next-kbd: Use Linux key codes
> >   replay: Use Linux key codes
>
> Please take a look at this replay failure:
> https://gitlab.com/qemu-project/qemu/-/jobs/14521293731#L842
>
> If the issue is caused by this pull request, please resend with a fix.
>
> If the issue is not caused by this pull request, please let me know. Thanks!

Oh I missed it, despite running CI tests with ci.variable=QEMU_CI=2
(https://gitlab.com/marcandre.lureau/qemu/-/pipelines/2543698396) What
should I use instead?

In "replay: Use Linux key codes" patch, we'd need something like:

diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index 081aaa36c5e..ce1031b4ad4 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -398,6 +398,9 @@ def decode_end(eid, name, dumpfile):
 # EVENT_AUDIO_IN has changed
 v13_event_table = v12_event_table

+# EVENT_ASYNC_INPUT has changed
+v14_event_table = v13_event_table
+
 def parse_arguments():
     "Grab arguments for script"
     parser = argparse.ArgumentParser()
@@ -416,7 +419,10 @@ def decode_file(filename):
     # see REPLAY_VERSION
     print("HEADER: version 0x%x" % (version))

-    if version == 0xe0200d:
+    if version == 0xe0200e:
+        event_decode_table = v14_event_table
+        replay_state.checkpoint_start = 30
+    elif version == 0xe0200d:
         event_decode_table = v13_event_table
         replay_state.checkpoint_start = 30
     elif version == 0xe0200c:

I can squash and resubmit, or does someone want to revisit it?

>
> Stefan
>
> >   ui/cocoa: Use Linux key codes
> >   ui/dbus: Use Linux key codes
> >   ui/gtk: Use Linux key codes
> >   ui/input-barrier: Use Linux key codes
> >   ui/input-legacy: Use Linux key codes
> >   ui/input-linux: Use Linux key codes
> >   ui/keymaps: Use Linux key codes
> >   ui/sdl2: Use Linux key codes
> >   ui/spice: Use Linux key codes
> >   ui/vnc: Use Linux key codes
> >   qemu-keymap: Use Linux key codes
> >   ui/console: Remove qemu_text_console_put_qcode()
> >   ui/input: Remove unused QKeyCode helpers and keymaps
> >
> > Daniel P. Berrangé (4):
> >   ui/vnc: fix OOB read access in VNC SASL mechname array
> >   ui/vnc: fix OOB write in VNC stats array
> >   ui/vnc: fix OOB write in lossy rect worker code
> >   ui/vnc: fix OOB read updating VNC update frequency stats
> >
> > Dongwon Kim (1):
> >   ui/gtk: Fix focus loss on re-attachment with single VC
> >
> > Heechan Kang (1):
> >   ui: fix validation of VNC extended clipboard data length
> >
> > Marc-André Lureau (1):
> >   ui/vt100: add vt100_fini() check
> >
> > Peter Maydell (2):
> >   ui/vt100: Standardize on uint8_t for "ch" byte variables
> >   ui/vt100: Take byte as uint8_t in bh_utf8_decode()
> >
> >  include/qemu/typedefs.h      |   1 +
> >  include/system/replay.h      |   2 +-
> >  include/ui/console.h         |   3 +-
> >  include/ui/input.h           |  92 ++++++-----
> >  include/ui/kbd-state.h       |  12 +-
> >  replay/replay-internal.h     |   6 +-
> >  ui/vnc.h                     |   4 +-
> >  ui/x_keymap.h                |   3 +-
> >  chardev/msmouse.c            |  12 +-
> >  chardev/wctablet.c           |  10 +-
> >  hw/arm/musicpal.c            |  31 ++--
> >  hw/char/escc.c               |  45 +++---
> >  hw/display/xenfb.c           |  51 ++-----
> >  hw/input/adb-kbd.c           | 246 +++++++++++++++--------------
> >  hw/input/adb-mouse.c         |  22 ++-
> >  hw/input/hid.c               |  41 +++--
> >  hw/input/ps2.c               | 118 +++++++-------
> >  hw/input/stellaris_gamepad.c |  11 +-
> >  hw/input/virtio-input-hid.c  |  89 ++++++-----
> >  hw/m68k/next-kbd.c           | 128 ++++++++--------
> >  qemu-keymap.c                |  41 +++--
> >  replay/replay-events.c       |   6 +-
> >  replay/replay-input.c        | 117 +++++---------
> >  replay/replay.c              |   2 +-
> >  replay/stubs-system.c        |   2 +-
> >  tools/qemu-vnc/input.c       |   9 +-
> >  ui/console.c                 |  62 +++++---
> >  ui/dbus-console.c            |   8 +-
> >  ui/gtk.c                     |  55 ++++---
> >  ui/input-barrier.c           |  26 ++--
> >  ui/input-keymap.c            |  74 +++++----
> >  ui/input-legacy.c            |  47 ++----
> >  ui/input-linux.c             |   3 +-
> >  ui/input.c                   | 214 ++++++++++++--------------
> >  ui/kbd-state.c               |  61 ++++----
> >  ui/keymaps.c                 |   4 +-
> >  ui/sdl2-input.c              |  17 ++-
> >  ui/spice-input.c             |   3 +-
> >  ui/vdagent.c                 |  20 +--
> >  ui/vnc-auth-sasl.c           |   2 +
> >  ui/vnc-clipboard.c           |   9 +-
> >  ui/vnc.c                     |  41 ++---
> >  ui/vt100.c                   |  11 +-
> >  ui/x_keymap.c                |  24 +--
> >  hw/input/trace-events        |   2 +-
> >  tools/qemu-vnc/trace-events  |   2 +-
> >  ui/cocoa.m                   | 289 ++++++++++++++++++-----------------
> >  ui/meson.build               |  29 ++--
> >  ui/trace-events              |   5 +-
> >  49 files changed, 1014 insertions(+), 1098 deletions(-)
> >
> > --
> > 2.54.0
> >
>
Re: [PULL v2 00/38] Ui patches
Posted by Stefan Hajnoczi 5 days, 19 hours ago
On Sun, May 24, 2026, 17:13 Marc-André Lureau <marcandre.lureau@redhat.com>
wrote:

> Hi
>
> On Mon, May 25, 2026 at 12:31 AM Stefan Hajnoczi <stefanha@gmail.com>
> wrote:
> >
> > On Thu, May 21, 2026 at 9:56 AM <marcandre.lureau@redhat.com> wrote:
> > >
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > The following changes since commit
> 3f129ea545f16e82b5e43fcc3866b134b7cc4dfc:
> > >
> > >   Merge tag 'pull-vfio-20260520' of https://github.com/legoater/qemu
> into staging (2026-05-20 16:53:28 -0400)
> > >
> > > are available in the Git repository at:
> > >
> > >   https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
> > >
> > > for you to fetch changes up to
> 95df9ffa98a785e4e9368018a72e643e77328ed1:
> > >
> > >   ui/gtk: Fix focus loss on re-attachment with single VC (2026-05-21
> 17:53:43 +0400)
> > >
> > > ----------------------------------------------------------------
> > > UI pull request
> > >
> > > - ui/input: Decouple internal and QAPI input events
> > > - VNC OOB fixes
> > > - vt100 fixes
> > > - GTK focus fix
> > >
> > > ----------------------------------------------------------------
> > >
> > > Akihiko Odaki (29):
> > >   ui/input: Introduce QemuInputEvent typedef
> > >   ui/input: Remove QAPI wrappers from QemuInputEvent
> > >   ui/input: Store QKeyCode directly in QemuInputKeyEvent
> > >   ui/input: Use Linux key codes for internal key events
> > >   ui/input: Prohibit sending KEY_RESERVED
> > >   ui/console: Add qemu_text_console_put_linux()
> > >   ui/kbd-state: Use Linux key codes
> > >   hw/arm/musicpal: Use Linux key codes
> > >   hw/char/escc: Use Linux key codes
> > >   hw/display/xenfb: Use Linux key codes
> > >   hw/input/adb-kbd: Use Linux key codes
> > >   hw/input/hid: Use Linux key codes
> > >   hw/input/ps2: Use Linux key codes
> > >   hw/input/virtio-input: Use Linux key codes
> > >   hw/m68k/next-kbd: Use Linux key codes
> > >   replay: Use Linux key codes
> >
> > Please take a look at this replay failure:
> > https://gitlab.com/qemu-project/qemu/-/jobs/14521293731#L842
> >
> > If the issue is caused by this pull request, please resend with a fix.
> >
> > If the issue is not caused by this pull request, please let me know.
> Thanks!
>
> Oh I missed it, despite running CI tests with ci.variable=QEMU_CI=2
> (https://gitlab.com/marcandre.lureau/qemu/-/pipelines/2543698396) What
> should I use instead?
>

I'm on my phone right now and can't dig into the details, but you can run
the functional-system-centos test locally to verify your branch.


> In "replay: Use Linux key codes" patch, we'd need something like:
>
> diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
> index 081aaa36c5e..ce1031b4ad4 100755
> --- a/scripts/replay-dump.py
> +++ b/scripts/replay-dump.py
> @@ -398,6 +398,9 @@ def decode_end(eid, name, dumpfile):
>  # EVENT_AUDIO_IN has changed
>  v13_event_table = v12_event_table
>
> +# EVENT_ASYNC_INPUT has changed
> +v14_event_table = v13_event_table
> +
>  def parse_arguments():
>      "Grab arguments for script"
>      parser = argparse.ArgumentParser()
> @@ -416,7 +419,10 @@ def decode_file(filename):
>      # see REPLAY_VERSION
>      print("HEADER: version 0x%x" % (version))
>
> -    if version == 0xe0200d:
> +    if version == 0xe0200e:
> +        event_decode_table = v14_event_table
> +        replay_state.checkpoint_start = 30
> +    elif version == 0xe0200d:
>          event_decode_table = v13_event_table
>          replay_state.checkpoint_start = 30
>      elif version == 0xe0200c:
>
> I can squash and resubmit, or does someone want to revisit it?
>

Yes, that's fine.

Stefan


> >
> > Stefan
> >
> > >   ui/cocoa: Use Linux key codes
> > >   ui/dbus: Use Linux key codes
> > >   ui/gtk: Use Linux key codes
> > >   ui/input-barrier: Use Linux key codes
> > >   ui/input-legacy: Use Linux key codes
> > >   ui/input-linux: Use Linux key codes
> > >   ui/keymaps: Use Linux key codes
> > >   ui/sdl2: Use Linux key codes
> > >   ui/spice: Use Linux key codes
> > >   ui/vnc: Use Linux key codes
> > >   qemu-keymap: Use Linux key codes
> > >   ui/console: Remove qemu_text_console_put_qcode()
> > >   ui/input: Remove unused QKeyCode helpers and keymaps
> > >
> > > Daniel P. Berrangé (4):
> > >   ui/vnc: fix OOB read access in VNC SASL mechname array
> > >   ui/vnc: fix OOB write in VNC stats array
> > >   ui/vnc: fix OOB write in lossy rect worker code
> > >   ui/vnc: fix OOB read updating VNC update frequency stats
> > >
> > > Dongwon Kim (1):
> > >   ui/gtk: Fix focus loss on re-attachment with single VC
> > >
> > > Heechan Kang (1):
> > >   ui: fix validation of VNC extended clipboard data length
> > >
> > > Marc-André Lureau (1):
> > >   ui/vt100: add vt100_fini() check
> > >
> > > Peter Maydell (2):
> > >   ui/vt100: Standardize on uint8_t for "ch" byte variables
> > >   ui/vt100: Take byte as uint8_t in bh_utf8_decode()
> > >
> > >  include/qemu/typedefs.h      |   1 +
> > >  include/system/replay.h      |   2 +-
> > >  include/ui/console.h         |   3 +-
> > >  include/ui/input.h           |  92 ++++++-----
> > >  include/ui/kbd-state.h       |  12 +-
> > >  replay/replay-internal.h     |   6 +-
> > >  ui/vnc.h                     |   4 +-
> > >  ui/x_keymap.h                |   3 +-
> > >  chardev/msmouse.c            |  12 +-
> > >  chardev/wctablet.c           |  10 +-
> > >  hw/arm/musicpal.c            |  31 ++--
> > >  hw/char/escc.c               |  45 +++---
> > >  hw/display/xenfb.c           |  51 ++-----
> > >  hw/input/adb-kbd.c           | 246 +++++++++++++++--------------
> > >  hw/input/adb-mouse.c         |  22 ++-
> > >  hw/input/hid.c               |  41 +++--
> > >  hw/input/ps2.c               | 118 +++++++-------
> > >  hw/input/stellaris_gamepad.c |  11 +-
> > >  hw/input/virtio-input-hid.c  |  89 ++++++-----
> > >  hw/m68k/next-kbd.c           | 128 ++++++++--------
> > >  qemu-keymap.c                |  41 +++--
> > >  replay/replay-events.c       |   6 +-
> > >  replay/replay-input.c        | 117 +++++---------
> > >  replay/replay.c              |   2 +-
> > >  replay/stubs-system.c        |   2 +-
> > >  tools/qemu-vnc/input.c       |   9 +-
> > >  ui/console.c                 |  62 +++++---
> > >  ui/dbus-console.c            |   8 +-
> > >  ui/gtk.c                     |  55 ++++---
> > >  ui/input-barrier.c           |  26 ++--
> > >  ui/input-keymap.c            |  74 +++++----
> > >  ui/input-legacy.c            |  47 ++----
> > >  ui/input-linux.c             |   3 +-
> > >  ui/input.c                   | 214 ++++++++++++--------------
> > >  ui/kbd-state.c               |  61 ++++----
> > >  ui/keymaps.c                 |   4 +-
> > >  ui/sdl2-input.c              |  17 ++-
> > >  ui/spice-input.c             |   3 +-
> > >  ui/vdagent.c                 |  20 +--
> > >  ui/vnc-auth-sasl.c           |   2 +
> > >  ui/vnc-clipboard.c           |   9 +-
> > >  ui/vnc.c                     |  41 ++---
> > >  ui/vt100.c                   |  11 +-
> > >  ui/x_keymap.c                |  24 +--
> > >  hw/input/trace-events        |   2 +-
> > >  tools/qemu-vnc/trace-events  |   2 +-
> > >  ui/cocoa.m                   | 289 ++++++++++++++++++-----------------
> > >  ui/meson.build               |  29 ++--
> > >  ui/trace-events              |   5 +-
> > >  49 files changed, 1014 insertions(+), 1098 deletions(-)
> > >
> > > --
> > > 2.54.0
> > >
> >
>
Re: [PULL v2 00/38] Ui patches
Posted by Akihiko Odaki 5 days, 11 hours ago
On 2026/05/25 6:32, Stefan Hajnoczi wrote:
> 
> 
> On Sun, May 24, 2026, 17:13 Marc-André Lureau 
> <marcandre.lureau@redhat.com <mailto:marcandre.lureau@redhat.com>> wrote:
> 
>     Hi
> 
>     On Mon, May 25, 2026 at 12:31 AM Stefan Hajnoczi <stefanha@gmail.com
>     <mailto:stefanha@gmail.com>> wrote:
>      >
>      > On Thu, May 21, 2026 at 9:56 AM <marcandre.lureau@redhat.com
>     <mailto:marcandre.lureau@redhat.com>> wrote:
>      > >
>      > > From: Marc-André Lureau <marcandre.lureau@redhat.com
>     <mailto:marcandre.lureau@redhat.com>>
>      > >
>      > > The following changes since commit
>     3f129ea545f16e82b5e43fcc3866b134b7cc4dfc:
>      > >
>      > >   Merge tag 'pull-vfio-20260520' of https://github.com/
>     legoater/qemu <https://github.com/legoater/qemu> into staging
>     (2026-05-20 16:53:28 -0400)
>      > >
>      > > are available in the Git repository at:
>      > >
>      > > https://gitlab.com/marcandre.lureau/qemu.git <https://
>     gitlab.com/marcandre.lureau/qemu.git> tags/ui-pull-request
>      > >
>      > > for you to fetch changes up to
>     95df9ffa98a785e4e9368018a72e643e77328ed1:
>      > >
>      > >   ui/gtk: Fix focus loss on re-attachment with single VC
>     (2026-05-21 17:53:43 +0400)
>      > >
>      > > ----------------------------------------------------------------
>      > > UI pull request
>      > >
>      > > - ui/input: Decouple internal and QAPI input events
>      > > - VNC OOB fixes
>      > > - vt100 fixes
>      > > - GTK focus fix
>      > >
>      > > ----------------------------------------------------------------
>      > >
>      > > Akihiko Odaki (29):
>      > >   ui/input: Introduce QemuInputEvent typedef
>      > >   ui/input: Remove QAPI wrappers from QemuInputEvent
>      > >   ui/input: Store QKeyCode directly in QemuInputKeyEvent
>      > >   ui/input: Use Linux key codes for internal key events
>      > >   ui/input: Prohibit sending KEY_RESERVED
>      > >   ui/console: Add qemu_text_console_put_linux()
>      > >   ui/kbd-state: Use Linux key codes
>      > >   hw/arm/musicpal: Use Linux key codes
>      > >   hw/char/escc: Use Linux key codes
>      > >   hw/display/xenfb: Use Linux key codes
>      > >   hw/input/adb-kbd: Use Linux key codes
>      > >   hw/input/hid: Use Linux key codes
>      > >   hw/input/ps2: Use Linux key codes
>      > >   hw/input/virtio-input: Use Linux key codes
>      > >   hw/m68k/next-kbd: Use Linux key codes
>      > >   replay: Use Linux key codes
>      >
>      > Please take a look at this replay failure:
>      > https://gitlab.com/qemu-project/qemu/-/jobs/14521293731#L842
>     <https://gitlab.com/qemu-project/qemu/-/jobs/14521293731#L842>
>      >
>      > If the issue is caused by this pull request, please resend with a
>     fix.
>      >
>      > If the issue is not caused by this pull request, please let me
>     know. Thanks!
> 
>     Oh I missed it, despite running CI tests with ci.variable=QEMU_CI=2
>     (https://gitlab.com/marcandre.lureau/qemu/-/pipelines/2543698396
>     <https://gitlab.com/marcandre.lureau/qemu/-/pipelines/2543698396>) What
>     should I use instead?
> 
> 
> I'm on my phone right now and can't dig into the details, but you can 
> run the functional-system-centos test locally to verify your branch.
> 
> 
>     In "replay: Use Linux key codes" patch, we'd need something like:
> 
>     diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
>     index 081aaa36c5e..ce1031b4ad4 100755
>     --- a/scripts/replay-dump.py
>     +++ b/scripts/replay-dump.py
>     @@ -398,6 +398,9 @@ def decode_end(eid, name, dumpfile):
>       # EVENT_AUDIO_IN has changed
>       v13_event_table = v12_event_table
> 
>     +# EVENT_ASYNC_INPUT has changed
>     +v14_event_table = v13_event_table
>     +
>       def parse_arguments():
>           "Grab arguments for script"
>           parser = argparse.ArgumentParser()
>     @@ -416,7 +419,10 @@ def decode_file(filename):
>           # see REPLAY_VERSION
>           print("HEADER: version 0x%x" % (version))
> 
>     -    if version == 0xe0200d:
>     +    if version == 0xe0200e:
>     +        event_decode_table = v14_event_table
>     +        replay_state.checkpoint_start = 30
>     +    elif version == 0xe0200d:
>               event_decode_table = v13_event_table
>               replay_state.checkpoint_start = 30
>           elif version == 0xe0200c:
> 
>     I can squash and resubmit, or does someone want to revisit it?
> 
> 
> Yes, that's fine.

This fix looks good to me too. Thank you for fixing this.

Regards,
Akihiko Odaki