initial spice support.
v5 cover initial spice support.
Hi,
Here comes v5 of the iniial spice support patch series.
* Detect spice in configure, Makefile windup.
* Support for keyboard, mouse and tablet.
* Support for simple display output (works as DisplayChangeListener, plays with any gfx card, sends simple draw commands to update dirty regions).
Note that this patch series does *not* yet contain the qxl paravirtual gfx card. That will come as part of a additional patch series after sorting the vgabios support.
The patches are also available in the git repository at:
git://anongit.freedesktop.org/spice/qemu submit.5
Changes since v4:
* Code style fixups.
* Small bug fix (display_remote not being set when configuring spice via config file).
Changes since v3:
* Drop global spice_server variable, provide a thin wrapper function instead so spice interfaces can be registered without needing spice_server.
* Update locking comments.
Changes since v2:
* Add copyright headers to the files.
* Add dprint for debug logging.
* Add mapping for buttons and leds.
* Add comments for locking+threads.
* Drop includes which qemu-common.h brings in.
* Compile -spice switch unconditionally.
* Hook up spice init using module.h, drop #ifdefs.
* Misc minor tweaks.
*** BLURB HERE ***
Gerd Hoffmann (10):
Use display types for local display only. Use machine_init() to register virtfs config options. add pflib: PixelFormat conversion library.
configure: add logging
add spice into the configure file
spice: core bits
spice: add keyboard
spice: add mouse
spice: simple display
spice: add tablet support
Makefile.objs | 3 + configure | 42 +++++- fsdev/qemu-fsdev.c | 9 + pflib.c | 213 +++++++++++++++++++++++++++ pflib.h | 20 +++ qemu-config.c | 18 +++ qemu-config.h | 1 + qemu-options.hx | 21 +++ sysemu.h | 1 - ui/qemu-spice.h | 41 +++++ ui/spice-core.c | 189 ++++++++++++++++++++++++ ui/spice-display.c | 412 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/spice-display.h | 69 +++++++++ ui/spice-input.c | 217 +++++++++++++++++++++++++++ vl.c | 50 +++++-- 15 files changed, 1287 insertions(+), 19 deletions(-) create mode 100644 pflib.c create mode 100644 pflib.h create mode 100644 ui/qemu-spice.h create mode 100644 ui/spice-core.c create mode 100644 ui/spice-display.c create mode 100644 ui/spice-display.h create mode 100644 ui/spice-input.c
PATCH v5 1/10 Use display types for local display only.
This patch drops DT_VNC. The display types are only used to select select the local display (i.e. curses, sdl, coca, ...). Remote displays (for now only vnc, spice will follow) can be enabled independently.
--- sysemu.h | 1 - vl.c | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-)
sysemu.h +0 -1
@@ -94,7 +94,6 @@ typedef enum DisplayTypeDT_DEFAULT ,DT_CURSES ,DT_SDL , -DT_VNC ,DT_NOGRAPHIC , } DisplayType;
vl.c +13 -11
@@ -172,6 +172,7 @@ static const char *data_dir;const char *bios_name =NULL ;enum vga_retrace_method vga_retrace_method =VGA_RETRACE_DUMB ;DisplayType display_type =DT_DEFAULT ; +int display_remote =0 ;const char * keyboard_layout =NULL ;ram_addr_t ram_size;const char *mem_path =NULL ;
@@ -2468,7 +2469,7 @@ int main(int argc, char **argv, char **envp) }break ;case QEMU_OPTION_vnc: - display_type =DT_VNC ; + display_remote++; vnc_display = optarg;break ;case QEMU_OPTION_no_acpi:
@@ -2898,17 +2899,17 @@ int main(int argc, char **argv, char **envp)/* just use the first displaystate for the moment */ ds =get_displaystate (); -if (display_type ==DT_DEFAULT ) { +if (display_type ==DT_DEFAULT && !display_remote) {#if defined(CONFIG_SDL ) || defined(CONFIG_COCOA ) display_type =DT_SDL ;#else - display_type =DT_VNC ; vnc_display ="localhost:0,to=99" ; show_vnc_port =1 ;#endif } +/* init local displays */ switch (display_type) {case DT_NOGRAPHIC :break ;
@@ -2926,7 +2927,12 @@ int main(int argc, char **argv, char **envp)cocoa_display_init (ds, full_screen);break ;#endif -case DT_VNC : +default : +break ; + } + +/* init remote displays */ +if (vnc_display) {vnc_display_init (ds);if (vnc_display_open (ds, vnc_display) <0 )exit (1 );
@@ -2934,12 +2940,10 @@ int main(int argc, char **argv, char **envp)if (show_vnc_port) {printf ("VNC server running on `%s'\n" ,vnc_display_local_addr (ds)); } -break ; -default : -break ; } -dpy_resize (ds); +/* display setup */ +dpy_resize (ds); dcl = ds->listeners;while (dcl !=NULL ) {if (dcl->dpy_refresh !=NULL ) {
@@ -2949,12 +2953,10 @@ int main(int argc, char **argv, char **envp) } dcl = dcl->next; } - -if (display_type ==DT_NOGRAPHIC || display_type ==DT_VNC ) { +if (ds->gui_timer ==NULL ) { nographic_timer =qemu_new_timer (rt_clock, nographic_update,NULL );qemu_mod_timer (nographic_timer,qemu_get_clock (rt_clock)); } -text_consoles_set_display (ds);if (gdbstub_dev &&gdbserver_start (gdbstub_dev) <0 ) {
Signature · 1 line
1.7.1
PATCH v5 2/10 Use machine_init() to register virtfs config options.
In reply to Gerd Hoffmann--- fsdev/qemu-fsdev.c | 9 +++++++++ vl.c | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-)
fsdev/qemu-fsdev.c +9 -0
@@ -16,6 +16,7 @@#include "qemu-queue.h" #include "osdep.h" #include "qemu-common.h" +#include "qemu-config.h" static QTAILQ_HEAD(FsTypeEntry_head, FsTypeListEntry) fstype_entries =QTAILQ_HEAD_INITIALIZER (fstype_entries);
@@ -75,3 +76,11 @@ FsTypeEntry *get_fsdev_fsentry(char *id) }return NULL ; } + +static void fsdev_register_config (void ) +{ +qemu_add_opts (&qemu_fsdev_opts); +qemu_add_opts (&qemu_virtfs_opts); +} +machine_init (fsdev_register_config); +
vl.c +0 -5
@@ -1856,11 +1856,6 @@ int main(int argc, char **argv, char **envp) tb_size =0 ; autostart=1 ; -#ifdef CONFIG_VIRTFS -qemu_add_opts (&qemu_fsdev_opts); -qemu_add_opts (&qemu_virtfs_opts); -#endif -/* first pass of option parsing */ optind =1 ;while (optind < argc) {
Signature · 1 line
1.7.1
PATCH v5 3/10 add pflib: PixelFormat conversion library.
In reply to Gerd Hoffmann--- Makefile.objs | 1 + pflib.c | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pflib.h | 20 ++++++ 3 files changed, 234 insertions(+), 0 deletions(-) create mode 100644 pflib.c create mode 100644 pflib.h
Makefile.objs +1 -0
@@ -83,6 +83,7 @@ common-obj-y += qemu-char.o savevm.o #aio.o common-obj-y += msmouse.o ps2.o common-obj-y += qdev.o qdev-properties.o common-obj-y += block-migration.o +common-obj-y += pflib.o common-obj-$(CONFIG_BRLAPI) += baum.o common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
pflib.c new file +213 -0
213 lines not on this page · raw message
pflib.h new file +20 -0
@@ -0,0 +1,20 @@ +#ifndef __QEMU_PFLIB_H +#define __QEMU_PFLIB_H + +/* +* PixelFormat conversion library. +* +* Author: Gerd Hoffmann <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2. See +* the COPYING file in the top-level directory. +* +*/ + +typedef struct QemuPfConv QemuPfConv ; + +QemuPfConv *qemu_pf_conv_get (PixelFormat *dst,PixelFormat *src); +void qemu_pf_conv_run (QemuPfConv *conv,void *dst,void *src,uint32_t cnt); +void qemu_pf_conv_put (QemuPfConv *conv); + +#endif
Signature · 1 line
1.7.1
PATCH v5 4/10 configure: add logging
In reply to Gerd HoffmannWrite compile commands and messages to config.log. Useful for debugging configure.
--- configure | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
configure +5 -2
@@ -16,15 +16,18 @@ TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.exe" trap "rm -f $TMPC $TMPO $TMPE ; exit" EXIT INT QUIT TERM +rm -f config.log compile_object() { - $cc $QEMU_CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null + echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log + $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1 } compile_prog() { local_cflags="$1" local_ldflags="$2" - $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags > /dev/null 2> /dev/null + echo $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log + $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log 2>&1 } # check whether a command is available to this shell (may be either an
Signature · 1 line
1.7.1
PATCH v5 5/10 add spice into the configure file
In reply to Gerd Hoffmann--- configure | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
configure +35 -0
@@ -320,6 +320,7 @@ pkgversion="" check_utests="no" user_pie="no" zero_malloc="" +spice="" # OS specific if check_define __linux__ ; then
@@ -621,6 +622,10 @@ for opt do ;; --enable-kvm) kvm="yes" ;; + --disable-spice) spice="no" + ;; + --enable-spice) spice="yes" + ;; --enable-profiler) profiler="yes" ;; --enable-cocoa)
@@ -900,6 +905,8 @@ echo " --enable-docs enable documentation build" echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" echo " --enable-vhost-net enable vhost-net acceleration support" +echo " --disable-spice disable spice" +echo " --enable-spice enable spice" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1
@@ -2050,6 +2057,29 @@ if compile_prog "" ""; then gcc_attribute_warn_unused_result=yes fi +# spice probe +if test "$spice" != "no" ; then + cat > $TMPC << EOF +#include <spice.h> +int main(void) { spice_server_new(); return 0; } +EOF + spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null) + spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null) + if $pkgconfig --atleast-version=0.5.3 spice-server &&\ + compile_prog "$spice_cflags" "$spice_libs" ; then + spice="yes" + libs_softmmu="$libs_softmmu $spice_libs" + QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" + else + if test "$spice" = "yes" ; then + feature_not_found "spice" + fi + spice="no" + fi +fi + +########################################## + ########################################## # check if we have fdatasync
@@ -2192,6 +2222,7 @@ echo "preadv support $preadv" echo "fdatasync $fdatasync" echo "uuid support $uuid" echo "vhost-net support $vhost_net" +echo "spice support $spice" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -2429,6 +2460,10 @@ if test "$fdatasync" = "yes" ; then echo "CONFIG_FDATASYNC=y" >> $config_host_mak fi +if test "$spice" = "yes" ; then + echo "CONFIG_SPICE=y" >> $config_host_mak +fi + # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak
Signature · 1 line
1.7.1
PATCH v5 6/10 spice: core bits
In reply to Gerd HoffmannAdd -spice command line switch. Has support setting passwd and port for now. With this patch applied the spice client can successfully connect to qemu. You can't do anything useful yet though.
--- Makefile.objs | 2 + qemu-config.c | 18 +++++ qemu-config.h | 1 + qemu-options.hx | 21 ++++++ ui/qemu-spice.h | 39 ++++++++++++ ui/spice-core.c | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ vl.c | 14 ++++ 7 files changed, 282 insertions(+), 0 deletions(-) create mode 100644 ui/qemu-spice.h create mode 100644 ui/spice-core.c
Makefile.objs +2 -0
@@ -88,6 +88,8 @@ common-obj-y += pflib.o common-obj-$(CONFIG_BRLAPI) += baum.o common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o +common-obj-$(CONFIG_SPICE) += ui/spice-core.o + audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o audio-obj-$(CONFIG_SDL) += sdlaudio.o audio-obj-$(CONFIG_OSS) += ossaudio.o
qemu-config.c +18 -0
@@ -336,6 +336,24 @@ static QemuOptsList qemu_cpudef_opts = { }, }; +QemuOptsList qemu_spice_opts = { + .name ="spice" , + .head =QTAILQ_HEAD_INITIALIZER (qemu_spice_opts.head), + .desc = { + { + .name ="port" , + .type =QEMU_OPT_NUMBER , + },{ + .name ="password" , + .type =QEMU_OPT_STRING , + },{ + .name ="disable-ticketing" , + .type =QEMU_OPT_BOOL , + }, + {/* end if list */ } + }, +}; +static QemuOptsList *vm_config_groups[32 ] = { &qemu_drive_opts, &qemu_chardev_opts,
qemu-config.h +1 -0
@@ -3,6 +3,7 @@extern QemuOptsList qemu_fsdev_opts;extern QemuOptsList qemu_virtfs_opts; +extern QemuOptsList qemu_spice_opts;QemuOptsList *qemu_find_opts (const char *group);void qemu_add_opts (QemuOptsList *list);
qemu-options.hx +21 -0
@@ -670,6 +670,27 @@ STEXI Enable SDL. ETEXI +DEF("spice", HAS_ARG, QEMU_OPTION_spice, + "-spice <args> enable spice\n", QEMU_ARCH_ALL) +STEXI +@item -spice @var{option}[,@var{option}[,...]] +@findex -spice +Enable the spice remote desktop protocol. Valid options are + +@table @option + +@item port=<nr> +Set the TCP port spice is listening on. + +@item password=<secret> +Set the password you need to authenticate. + +@item disable-ticketing +Allow client connects without authentication. + +@end table +ETEXI + DEF("portrait", 0, QEMU_OPTION_portrait, "-portrait rotate graphical output 90 deg left (only PXA LCD)\n", QEMU_ARCH_ALL)
ui/qemu-spice.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright (C) 2010 Red Hat, Inc. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 or +* (at your option) version 3 of the License. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef QEMU_SPICE_H +#define QEMU_SPICE_H + +#ifdef CONFIG_SPICE + +#include <spice.h> + +#include "qemu-option.h" +#include "qemu-config.h" + +extern int using_spice; + +void qemu_spice_init (void ); +int qemu_spice_add_interface (SpiceBaseInstance *sin); + +#else /* CONFIG_SPICE */ + +#define using_spice 0 + +#endif /* CONFIG_SPICE */ + +#endif /* QEMU_SPICE_H */
ui/spice-core.c new file +187 -0
187 lines not on this page · raw message
vl.c +14 -0
@@ -161,6 +161,8 @@ int main(int argc, char **argv)#include "cpus.h" #include "arch_init.h" +#include "ui/qemu-spice.h" +//#define DEBUG_NET //#define DEBUG_SLIRP
@@ -2599,6 +2601,18 @@ int main(int argc, char **argv, char **envp) }break ; } +case QEMU_OPTION_spice: + olist =qemu_find_opts ("spice" ); +if (!olist) { +fprintf (stderr,"spice is not supported by this qemu build.\n" ); +exit (1 ); + } + opts =qemu_opts_parse (olist, optarg,0 ); +if (!opts) { +fprintf (stderr,"parse error: %s\n" , optarg); +exit (1 ); + } +break ;case QEMU_OPTION_writeconfig: {FILE *fp;
Signature · 1 line
1.7.1
PATCH v5 7/10 spice: add keyboard
In reply to Gerd HoffmannOpen keyboard channel. Now you can type into the spice client and the keyboard events are sent to your guest. You'll need some other display like vnc to actually see the guest responding to them though.
--- Makefile.objs | 2 +- ui/qemu-spice.h | 1 + ui/spice-core.c | 2 + ui/spice-input.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 1 deletions(-) create mode 100644 ui/spice-input.c
Makefile.objs +1 -1
@@ -88,7 +88,7 @@ common-obj-y += pflib.o common-obj-$(CONFIG_BRLAPI) += baum.o common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o -common-obj-$(CONFIG_SPICE) += ui/spice-core.o +common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o audio-obj-$(CONFIG_SDL) += sdlaudio.o
ui/qemu-spice.h +1 -0
@@ -28,6 +28,7 @@extern int using_spice;void qemu_spice_init (void ); +void qemu_spice_input_init (void );int qemu_spice_add_interface (SpiceBaseInstance *sin);#else /* CONFIG_SPICE */
ui/spice-core.c +2 -0
@@ -167,6 +167,8 @@ void qemu_spice_init(void)spice_server_init (spice_server, &core_interface); using_spice =1 ; + +qemu_spice_input_init (); }int qemu_spice_add_interface (SpiceBaseInstance *sin)
ui/spice-input.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v5 8/10 spice: add mouse
In reply to Gerd HoffmannOpen mouse channel. Now you can move the guests mouse pointer. No tablet / absolute positioning (yet) though.
--- ui/spice-input.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-)
ui/spice-input.c +52 -0
@@ -74,12 +74,64 @@ static void kbd_leds(void *opaque, int ledstate)spice_server_kbd_leds (&kbd->sin, ledstate); } +/* mouse bits */ + +typedef struct QemuSpiceMouse { +SpiceMouseInstance sin; +}QemuSpiceMouse ; + +static int map_buttons (int spice_buttons) +{ +int qemu_buttons =0 ; + +/* +* Note: SPICE_MOUSE_BUTTON_* specifies the wire protocol but this +* isn't what we get passed in via interface callbacks for the +* middle and right button ... +*/ +if (spice_buttons &SPICE_MOUSE_BUTTON_MASK_LEFT ) { + qemu_buttons |=MOUSE_EVENT_LBUTTON ; + } +if (spice_buttons &0x04 /* SPICE_MOUSE_BUTTON_MASK_MIDDLE */ ) { + qemu_buttons |=MOUSE_EVENT_MBUTTON ; + } +if (spice_buttons &0x02 /* SPICE_MOUSE_BUTTON_MASK_RIGHT */ ) { + qemu_buttons |=MOUSE_EVENT_RBUTTON ; + } +return qemu_buttons; +} + +static void mouse_motion (SpiceMouseInstance *sin,int dx,int dy,int dz, +uint32_t buttons_state) +{ +kbd_mouse_event (dx, dy, dz,map_buttons (buttons_state)); +} + +static void mouse_buttons (SpiceMouseInstance *sin,uint32_t buttons_state) +{ +kbd_mouse_event (0 ,0 ,0 ,map_buttons (buttons_state)); +} + +static const SpiceMouseInterface mouse_interface = { + .base.type =SPICE_INTERFACE_MOUSE , + .base.description ="mouse" , + .base.major_version =SPICE_INTERFACE_MOUSE_MAJOR , + .base.minor_version =SPICE_INTERFACE_MOUSE_MINOR , + .motion = mouse_motion, + .buttons = mouse_buttons, +}; +void qemu_spice_input_init (void ) {QemuSpiceKbd *kbd; +QemuSpiceMouse *mouse; kbd =qemu_mallocz (sizeof (*kbd)); kbd->sin.base.sif = &kbd_interface.base;qemu_spice_add_interface (&kbd->sin.base);qemu_add_led_event_handler (kbd_leds, kbd); + + mouse =qemu_mallocz (sizeof (*mouse)); + mouse->sin.base.sif = &mouse_interface.base; +qemu_spice_add_interface (&mouse->sin.base); }
Signature · 1 line
1.7.1
PATCH v5 9/10 spice: simple display
In reply to Gerd HoffmannWith that patch applied you'll actually see the guests screen in the spice client. This does *not* bring qxl and full spice support though. This is basically the qxl vga mode made more generic, so it plays together with any qemu-emulated gfx card. You can display stdvga or cirrus via spice client. You can have both vnc and spice enabled and clients connected at the same time.
--- Makefile.objs | 2 +- ui/qemu-spice.h | 1 + ui/spice-display.c | 412 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/spice-display.h | 69 +++++++++ vl.c | 7 + 5 files changed, 490 insertions(+), 1 deletions(-) create mode 100644 ui/spice-display.c create mode 100644 ui/spice-display.h
Makefile.objs +1 -1
@@ -88,7 +88,7 @@ common-obj-y += pflib.o common-obj-$(CONFIG_BRLAPI) += baum.o common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o -common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o +common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display.o audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o audio-obj-$(CONFIG_SDL) += sdlaudio.o
ui/qemu-spice.h +1 -0
@@ -29,6 +29,7 @@ extern int using_spice;void qemu_spice_init (void );void qemu_spice_input_init (void ); +void qemu_spice_display_init (DisplayState *ds);int qemu_spice_add_interface (SpiceBaseInstance *sin);#else /* CONFIG_SPICE */
ui/spice-display.c new file +412 -0
412 lines not on this page · raw message
ui/spice-display.h new file +69 -0
69 lines not on this page · raw message
vl.c +7 -0
@@ -2908,6 +2908,8 @@ int main(int argc, char **argv, char **envp)/* just use the first displaystate for the moment */ ds =get_displaystate (); +if (using_spice) + display_remote++;if (display_type ==DT_DEFAULT && !display_remote) {#if defined(CONFIG_SDL ) || defined(CONFIG_COCOA ) display_type =DT_SDL ;
@@ -2950,6 +2952,11 @@ int main(int argc, char **argv, char **envp)printf ("VNC server running on `%s'\n" ,vnc_display_local_addr (ds)); } } +#ifdef CONFIG_SPICE +if (using_spice) { +qemu_spice_display_init (ds); + } +#endif /* display setup */ dpy_resize (ds);
Signature · 1 line
1.7.1
PATCH v5 10/10 spice: add tablet support
In reply to Gerd HoffmannAdd support for the spice tablet interface. The tablet interface will be registered (and then used by the spice client) as soon as a absolute pointing device is available and used by the guest, i.e. you'll have to configure your guest with '-usbdevice tablet'.
--- ui/spice-display.c | 2 +- ui/spice-input.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 88 insertions(+), 8 deletions(-)
ui/spice-display.c +1 -1
@@ -180,7 +180,7 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd) surface.width =ds_get_width (ssd->ds); surface.height =ds_get_height (ssd->ds); surface.stride = -surface.width *4 ; - surface.mouse_mode =0 ; + surface.mouse_mode = true; surface.flags =0 ; surface.type =0 ; surface.mem = (intptr_t )ssd->buf;
ui/spice-input.c +87 -7
119 lines not on this page · raw message
Signature · 1 line
1.7.1
Quoted 4 lines · Gerd Hoffmann
Hi,Here comes v5 of the iniial spice support patch series.
For the whole series.
Once folks have gotten a chance to review it a day or two more, I'll pull the repo if there are no issues.
Regards,
Anthony Liguori
Quoted 75 lines
* Detect spice in configure,
Makefilewindup.
* Support for keyboard, mouse and tablet.
* Support for simple display output (works as DisplayChangeListener, plays with any gfx card, sends simple draw commands to update dirty regions).Note that this patch series does *not* yet contain the qxl paravirtual gfx card. That will come as part of a additional patch series after sorting the vgabios support.
The patches are also available in the git repository at:
git://anongit.freedesktop.org/spice/qemusubmit.5Changes since v4:
* Code style fixups.
* Small bug fix (display_remotenot being set when configuring spice via config file).Changes since v3:
* Drop globalspice_servervariable, provide a thin wrapper function instead so spice interfaces can be registered without needingspice_server.
* Update locking comments.Changes since v2:
* Add copyright headers to the files.
* Add dprint for debug logging.
* Add mapping for buttons and leds.
* Add comments for locking+threads.
* Drop includes whichqemu-common.hbrings in.
* Compile -spice switch unconditionally.
* Hook up spice init usingmodule.h, drop #ifdefs.
* Misc minor tweaks.*** BLURB HERE ***
Gerd Hoffmann (10):
Use display types for local display only. Usemachine_init()to register virtfs config options. add pflib: PixelFormat conversion library.
configure: add logging
add spice into the configure file
spice: core bits
spice: add keyboard
spice: add mouse
spice: simple display
spice: add tablet supportMakefile.objs | 3 + configure | 42 +++++- fsdev/qemu-fsdev.c | 9 + pflib.c | 213 +++++++++++++++++++++++++++ pflib.h | 20 +++ qemu-config.c | 18 +++ qemu-config.h | 1 + qemu-options.hx | 21 +++ sysemu.h | 1 - ui/qemu-spice.h | 41 +++++ ui/spice-core.c | 189 ++++++++++++++++++++++++ ui/spice-display.c | 412 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/spice-display.h | 69 +++++++++ ui/spice-input.c | 217 +++++++++++++++++++++++++++ vl.c | 50 +++++-- 15 files changed, 1287 insertions(+), 19 deletions(-)create mode 100644
pflib.c
create mode 100644pflib.h
create mode 100644ui/qemu-spice.h
create mode 100644ui/spice-core.c
create mode 100644ui/spice-display.c
create mode 100644ui/spice-display.h
create mode 100644ui/spice-input.c
Quoted 7 lines · Anthony Liguori
Quoted 5 lines · Gerd Hoffmann
Hi,
Here comes v5 of the iniial spice support patch series.
Quoted 6 lines
Reviewed-by Anthony Liguori <[email protected]>For the whole series.
Once folks have gotten a chance to review it a day or two more, I'll pull the repo if there are no issues.
Looks fine to me too, though the fsdev patch seems to be unrelated.
Quoted 84 lines
Regards,
Anthony Liguori
Quoted 76 lines
* Detect spice in configure,
Makefilewindup.
* Support for keyboard, mouse and tablet.
* Support for simple display output (works as DisplayChangeListener, plays with any gfx card, sends simple draw commands to update dirty regions).Note that this patch series does *not* yet contain the qxl paravirtual gfx card. That will come as part of a additional patch series after sorting the vgabios support.
The patches are also available in the git repository at:
git://anongit.freedesktop.org/spice/qemusubmit.5Changes since v4:
* Code style fixups.
* Small bug fix (display_remotenot being set when configuring spice via config file).Changes since v3:
* Drop globalspice_servervariable, provide a thin wrapper function instead so spice interfaces can be registered without needingspice_server.
* Update locking comments.Changes since v2:
* Add copyright headers to the files.
* Add dprint for debug logging.
* Add mapping for buttons and leds.
* Add comments for locking+threads.
* Drop includes whichqemu-common.hbrings in.
* Compile -spice switch unconditionally.
* Hook up spice init usingmodule.h, drop #ifdefs.
* Misc minor tweaks.*** BLURB HERE ***
Gerd Hoffmann (10):
Use display types for local display only. Usemachine_init()to register virtfs config options. add pflib: PixelFormat conversion library.
configure: add logging
add spice into the configure file
spice: core bits
spice: add keyboard
spice: add mouse
spice: simple display
spice: add tablet supportMakefile.objs | 3 +
configure | 42 +++++-fsdev/qemu-fsdev.c| 9 +
pflib.c | 213 +++++++++++++++++++++++++++pflib.h| 20 +++
qemu-config.c | 18 +++
qemu-config.h | 1 +
qemu-options.hx | 21 +++
sysemu.h | 1 -
ui/qemu-spice.h | 41 +++++ui/spice-core.c| 189 ++++++++++++++++++++++++ui/spice-display.c| 412
++++++++++++++++++++++++++++++++++++++++++++++++++++
ui/spice-display.h | 69 +++++++++ui/spice-input.c| 217 +++++++++++++++++++++++++++vl.c| 50 +++++--15 files changed, 1287 insertions(+), 19 deletions(-)create mode 100644
pflib.c
create mode 100644pflib.h
create mode 100644ui/qemu-spice.h
create mode 100644ui/spice-core.c
create mode 100644ui/spice-display.c
create mode 100644ui/spice-display.h
create mode 100644ui/spice-input.c