display: add -display spice-app launching a Spice client

Add a new display backend that will configure Spice to allow a remote
client to control QEMU in a similar fashion as other QEMU display
backend/UI like GTK.

For this to work, it will set up Spice server with a unix socket, and
register a VC chardev that will be exposed as Spice ports. A QMP
monitor is also exposed as a Spice port, this allows the remote client
fuller qemu control and state handling.

- doesn't handle VC set_echo() - this doesn't seem a strong
  requirement, very few front-end use it
- spice options can be tweaked with other -spice arguments
- Windows support shouldn't be hard to do, but will probably use a TCP
  port instead
- we may want to watch the child process to quit automatically if it
  crashed

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Victor Toso <victortoso@redhat.com>
Message-id: 20190221110703.5775-12-marcandre.lureau@redhat.com

[ kraxel: squash incremental fix ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-02-21 12:07:03 +01:00 committed by Gerd Hoffmann
parent 4c77ee12da
commit d8aec9d9f1
4 changed files with 218 additions and 1 deletions

View file

@ -1110,12 +1110,17 @@
#
# @cocoa: The Cocoa user interface.
#
# @spice-app: Set up a Spice server and run the default associated
# application to connect to it. The server will redirect
# the serial console and QEMU monitors. (Since 4.0)
#
# Since: 2.12
#
##
{ 'enum' : 'DisplayType',
'data' : [ 'default', 'none', 'gtk', 'sdl',
'egl-headless', 'curses', 'cocoa' ] }
'egl-headless', 'curses', 'cocoa',
'spice-app'] }
##
# @DisplayOptions: