From patchwork Wed Dec 12 16:30:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uri Lublin X-Patchwork-Id: 205574 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A92D42C008F for ; Thu, 13 Dec 2012 03:31:27 +1100 (EST) Received: from localhost ([::1]:39208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TipDO-0004UV-LL for incoming@patchwork.ozlabs.org; Wed, 12 Dec 2012 11:31:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TipDB-0004Ic-Gk for qemu-devel@nongnu.org; Wed, 12 Dec 2012 11:31:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TipCz-0005aB-Sa for qemu-devel@nongnu.org; Wed, 12 Dec 2012 11:31:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TipCz-0005Zv-Lg for qemu-devel@nongnu.org; Wed, 12 Dec 2012 11:30:57 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBCGUtSR023579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Dec 2012 11:30:57 -0500 Received: from ulublin.csb (dhcp-4-37.tlv.redhat.com [10.35.4.37]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBCGUr0j011098 for ; Wed, 12 Dec 2012 11:30:54 -0500 From: Uri Lublin To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2012 18:30:47 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] qxl+vnc: register a vm state change handler for dummy spice_server X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When qxl + vnc are used, a dummy spice_server is initialized. The spice_server has to be told when the VM runstate changes, which is what this patch does. Without it, from qxl_send_events(), the following error message is shown: qxl_send_events: spice-server bug: guest stopped, ignoring Signed-off-by: Uri Lublin --- v1 -> v2: make checkpatch happy --- ui/spice-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 261c6f2..59ce5f6 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -732,6 +732,8 @@ int qemu_spice_add_interface(SpiceBaseInstance *sin) */ spice_server = spice_server_new(); spice_server_init(spice_server, &core_interface); + qemu_add_vm_change_state_handler(vm_change_state_handler, + &spice_server); } return spice_server_add_interface(spice_server, sin);