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
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel