From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyFca-0006g3-GN for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyFcW-0005nY-9E for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyFcW-0005n9-48 for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:24 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 952D8BBB3D for ; Fri, 29 May 2015 08:26:23 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 29 May 2015 10:26:17 +0200 Message-Id: <1432887978-7411-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1432887978-7411-1-git-send-email-kraxel@redhat.com> References: <1432887978-7411-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 3/4] spice: don't update mm_time when spice-server is stopped. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Skip mm_time updates (in qxl device memory) in case the guest is stopped. Guest isn't able to look anyway, and it causes problems with migration. Also make sure the initial state for spice server is stopped. Reported-by: Dr. David Alan Gilbert Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 4 ++++ ui/spice-core.c | 1 + 2 files changed, 5 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 8f40dfb..b220e2d 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -504,6 +504,10 @@ static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time) { PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); + if (!qemu_spice_display_is_running(&qxl->ssd)) { + return; + } + trace_qxl_interface_set_mm_time(qxl->id, mm_time); qxl->shadow_rom.mm_clock = cpu_to_le32(mm_time); qxl->rom->mm_clock = cpu_to_le32(mm_time); diff --git a/ui/spice-core.c b/ui/spice-core.c index f00e074..2e8384e 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -804,6 +804,7 @@ void qemu_spice_init(void) qemu_spice_audio_init(); qemu_add_vm_change_state_handler(vm_change_state_handler, NULL); + qemu_spice_display_stop(); g_free(x509_key_file); g_free(x509_cert_file); -- 1.8.3.1