Skip to content

Support external GUIs

Anthony Liguori qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 1 replyIn review

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/4Fix an overflow in term_putsmonitor.c+4 -11 reply
3/4Improve character device read performancevl.c+42 -10 replies
4/4Add an example GTK based GUI that uses the shared memory interfacegtk/Makefile gtk/README gtk/gtk-qemu +5 more+1259 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] Support external GUIs

The following set of patches implement support for building efficient external GUIs for QEMU.

The current methods of writing an external GUI include trying to use SDL_WINDOWID, VNC, or forking QEMU.

SDL_WINDOWID is problematic because keyboard/mouse events do not get transmitted properly. One can use the monitor's sendkey interface but this interface doesn't support every possible key sequence and until recently did not support mouse movement. Also, it's not possible to do interesting things like software scaling since you never have access to the actual pixel data. Resizing your host widget properly is also impossible without modifying QEMU.

VNC is a bit better since you have proper access to the pixel data. However, there's a considerable CPU overhead when using VNC. This is fine when interacting over the network but on localhost it makes QEMU seem less speedy than it actually is.

This patch series introduces a new display mechanism. This display mechanism writes the VGA data to a shared memory segment. The shared memory information is transmitted over a character device that's specified on the command line.

The initial results are very promising. My win2k guest seems to perform equally well with my sample GUI as it does with SDL.

Included in this series is the actual patch to QEMU, a couple fixes for problems I encountered along the way, and an example external GUI written in GTK. To show how flexible this really is, I actually wrote most of the GUI in Python. The sample GUI is essentially a clone of the SDL GUI.

This mechanism is really fast for X-Windows and at least reasonable for OS X and Win32 (although the code may need some tweaking to use the proper calls).

Comments are appreciated. I hope the first three patches can be applied in the near future.

Regards,

Anthony Liguori