qxl: add QXL_IO_MONITORS_CONFIG_ASYNC
PATCH v12 1/2 qxl: add QXL_IO_MONITORS_CONFIG_ASYNC
Revision bumped to 4 for new IO support, enabled for spice-server >= 0.11.1. New io enabled iff revision is 4. Revision can be set to 4, and defaults to 4, iff spice-server >= 0.11.1 && spice-protocol >= 0.12.0.
This io calls the corresponding new spice api spice_qxl_monitors_config_async to let spice-server read a new guest set monitors config and notify the client.
On migration reissue spice_qxl_monitors_config_async.
RHBZ: 770842
Signed-off-by Alon Levy <[email protected]>
---v11->v12:
fix build with older spice server (Gerd).
configure | 7 ++++ hw/qxl.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++--- hw/qxl.h | 8 +++++ trace-events | 1 + ui/spice-display.h | 1 + 5 files changed, 110 insertions(+), 4 deletions(-)
configure +7 -0
@@ -2657,6 +2657,9 @@ EOF spice="yes" libs_softmmu="$libs_softmmu $spice_libs" QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" + if $pkg_config --atleast-version=0.12.0 spice-protocol >/dev/null 2>&1; then + spice_qxl_io_monitors_config_async="yes" + fi else if test "$spice" = "yes" ; then feature_not_found "spice"
@@ -3392,6 +3395,10 @@ if test "$spice" = "yes" ; then echo "CONFIG_SPICE=y" >> $config_host_mak fi +if test "$spice_qxl_io_monitors_config_async" = "yes" ; then + echo "CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC=y" >> $config_host_mak +fi + if test "$smartcard" = "yes" ; then echo "CONFIG_SMARTCARD=y" >> $config_host_mak fi
hw/qxl.c +93 -4
189 lines not on this page · raw message
hw/qxl.h +8 -0
@@ -71,6 +71,8 @@ typedef struct PCIQXLDevice { } guest_surfaces;QXLPHYSICAL guest_cursor; +QXLPHYSICAL guest_monitors_config; +QemuMutex track_lock;/* thread signaling */
@@ -128,7 +130,13 @@ typedef struct PCIQXLDevice { } \ }while (0 ) +/* 0x000b01 == 0.11.1 */ +#if SPICE_SERVER_VERSION >=0x000b01 &&\ + defined(CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC ) +#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12 +#else #define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10 +#endif /* qxl.c */ void *qxl_phys2virt (PCIQXLDevice *qxl,QXLPHYSICAL phys,int group_id);
trace-events +1 -0
@@ -956,6 +956,7 @@ qxl_spice_destroy_surfaces(int qid, int async) "%d async=%d" qxl_spice_destroy_surface_wait_complete(int qid, uint32_t id) "%d sid=%d" qxl_spice_destroy_surface_wait(int qid, uint32_t id, int async) "%d sid=%d async=%d" qxl_spice_flush_surfaces_async(int qid, uint32_t surface_count, uint32_t num_free_res) "%d s#=%d, res#=%d" +qxl_spice_monitors_config(int id) "%d" qxl_spice_loadvm_commands(int qid, void *ext, uint32_t count) "%d ext=%p count=%d" qxl_spice_oom(int qid) "%d" qxl_spice_reset_cursor(int qid) "%d"
ui/spice-display.h +1 -0
@@ -51,6 +51,7 @@ typedef enum qxl_async_io {enum {QXL_COOKIE_TYPE_IO ,QXL_COOKIE_TYPE_RENDER_UPDATE_AREA , +QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG , }; typedef struct QXLCookie {
Signature · 1 line
1.7.11.2
PATCH v12 2/2 configure: print spice-protocol and spice-server versions
Signed-off-by Alon Levy <[email protected]>
--- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
configure +3 -1
@@ -2657,6 +2657,8 @@ EOF spice="yes" libs_softmmu="$libs_softmmu $spice_libs" QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" + spice_protocol_version=$($pkg_config --modversion spice-protocol) + spice_server_version=$($pkg_config --modversion spice-server) if $pkg_config --atleast-version=0.12.0 spice-protocol >/dev/null 2>&1; then spice_qxl_io_monitors_config_async="yes" fi
@@ -3114,7 +3116,7 @@ echo "libcap-ng support $cap_ng" echo "vhost-net support $vhost_net" echo "Trace backend $trace_backend" echo "Trace output file $trace_file-<pid>" -echo "spice support $spice" +echo "spice support $spice ($spice_protocol_version/$spice_server_version)" echo "rbd support $rbd" echo "xfsctl support $xfs" echo "nss used $smartcard_nss"
Signature · 1 line
1.7.11.2
Quoted 2 lines · Alon Levy
v11->v12:
fix build with older spice server (Gerd).
Replaced patches in the spice queue.
thanks,
Gerd