diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-04-27 11:50:11 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-09 14:23:24 +0100 |
commit | a19cbfb346425cc760ed19b4e746417df636b761 (patch) | |
tree | 4c178cded4bd81e287dedcb482fc88532d286dc1 /ui/spice-core.c | |
parent | 7943a2fac78b1b865093923bf1bdb08ae8664b3d (diff) |
spice: add qxl device
qxl is a paravirtual graphics card. The qxl device is the bridge
between the guest and the spice server (aka libspice-server). The
spice server will send the rendering commands to the spice client, which
will actually render them.
The spice server is also able to render locally, which is done in case
the guest wants read something from video memory. Local rendering is
also used to support display over vnc and sdl.
qxl is activated using "-vga qxl". qxl supports multihead, additional
cards can be added via '-device qxl".
[ v2: add copyright to files ]
[ v2: use qemu-common.h for standard includes ]
[ v2: create separate qxl-vga device for primary ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r-- | ui/spice-core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c index d13bdc269d..b7fa0315bd 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -370,6 +370,21 @@ void qemu_spice_init(void) int qemu_spice_add_interface(SpiceBaseInstance *sin) { + if (!spice_server) { + if (QTAILQ_FIRST(&qemu_spice_opts.head) != NULL) { + fprintf(stderr, "Oops: spice configured but not active\n"); + exit(1); + } + /* + * Create a spice server instance. + * It does *not* listen on the network. + * It handles QXL local rendering only. + * + * With a command line like '-vnc :0 -vga qxl' you'll end up here. + */ + spice_server = spice_server_new(); + spice_server_init(spice_server, &core_interface); + } return spice_server_add_interface(spice_server, sin); } |