From 3b5704b2f80189b2f9fdddf1690998e566eeacab Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 5 Mar 2015 09:30:16 +0100 Subject: monitor: Make client_migrate_info synchronous Live migration with spice works like this today: (1) client_migrate_info monitor cmd (2) spice server notifies client, client connects to target host. (3) qemu waits until spice client connect is finished. (4) send over vmstate (i.e. main part of live migration). (5) spice handover to target host. (3) is implemented by making client_migrate_info a async monitor command. This is the only async monitor command we have. The original reason to implement this dance was that qemu did not accept new tcp connections while the incoming migration was running, so (2) and (4) could not be done in parallel. That issue was fixed long ago though. Qemu version 1.3.0 (released Dec 2012) and newer happily accept tcp connects while the incoming migration runs. Time to drop step (3). This patch does exactly that, by making the monitor command synchronous and removing the code needed to handle the async monitor command in ui/spice-core.c Signed-off-by: Gerd Hoffmann --- include/ui/qemu-spice.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/ui') diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 25b94c7..42db3c1 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -42,8 +42,7 @@ int qemu_spice_set_passwd(const char *passwd, bool fail_if_connected, bool disconnect_if_connected); int qemu_spice_set_pw_expire(time_t expires); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, - const char *subject, - MonitorCompletion cb, void *opaque); + const char *subject); CharDriverState *qemu_chr_open_spice_vmc(const char *type); #if SPICE_SERVER_VERSION >= 0x000c02 @@ -70,10 +69,8 @@ static inline int qemu_spice_set_pw_expire(time_t expires) return -1; } static inline int qemu_spice_migrate_info(const char *h, int p, int t, - const char *s, - MonitorCompletion cb, void *opaque) + const char *s) { - cb(opaque, NULL); return -1; } -- cgit v1.1 From c1d37cd353be3ea4c5773fc227ba8459c1f20470 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 14 Apr 2015 08:56:21 +0200 Subject: spice: fix simple display on bigendian hosts Denis Kirjanov is busy getting spice run on ppc64 and trapped into this one. Spice wire format is little endian, so we have to explicitly say we want little endian when letting pixman convert the data for us. Reported-by: Denis Kirjanov Signed-off-by: Gerd Hoffmann --- include/ui/qemu-pixman.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ui') diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 5d7a9ac..e34c4ef 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -35,6 +35,7 @@ # define PIXMAN_BE_r8g8b8a8 PIXMAN_r8g8b8a8 # define PIXMAN_BE_x8b8g8r8 PIXMAN_x8b8g8r8 # define PIXMAN_BE_a8b8g8r8 PIXMAN_a8b8g8r8 +# define PIXMAN_LE_x8r8g8b8 PIXMAN_b8g8r8x8 #else # define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8 # define PIXMAN_BE_x8r8g8b8 PIXMAN_b8g8r8x8 @@ -45,6 +46,7 @@ # define PIXMAN_BE_r8g8b8a8 PIXMAN_a8b8g8r8 # define PIXMAN_BE_x8b8g8r8 PIXMAN_r8g8b8x8 # define PIXMAN_BE_a8b8g8r8 PIXMAN_r8g8b8a8 +# define PIXMAN_LE_x8r8g8b8 PIXMAN_x8r8g8b8 #endif /* -------------------------------------------------------------------- */ -- cgit v1.1 From dc8dceee64f45820c20f3ffa3c3fecd7b6539990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 24 Mar 2015 17:50:12 +0100 Subject: spice: set pointer position on hotspot The Spice protocol uses cursor position on hotspot: the client is applying hotspot offset when drawing the cursor. Signed-off-by: Gerd Hoffmann --- include/ui/spice-display.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/ui') diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index 53883a1..b25328a 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -97,7 +97,8 @@ struct SimpleSpiceDisplay { /* cursor (without qxl): displaychangelistener -> spice server */ SimpleSpiceCursor *ptr_define; SimpleSpiceCursor *ptr_move; - uint16_t ptr_x, ptr_y; + int16_t ptr_x, ptr_y; + int16_t hot_x, hot_y; /* cursor (with qxl): qxl local renderer -> displaychangelistener */ QEMUCursor *cursor; -- cgit v1.1