From patchwork Mon Apr 23 10:24:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 154442 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 42C00B6FD3 for ; Mon, 23 Apr 2012 23:47:52 +1000 (EST) Received: from localhost ([::1]:53305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMJcL-0005x8-JL for incoming@patchwork.ozlabs.org; Mon, 23 Apr 2012 09:47:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMGXi-00065L-Kw for qemu-devel@nongnu.org; Mon, 23 Apr 2012 06:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMGXd-0008GH-Gk for qemu-devel@nongnu.org; Mon, 23 Apr 2012 06:30:50 -0400 Received: from indium.canonical.com ([91.189.90.7]:58029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMGXd-0008G8-5o for qemu-devel@nongnu.org; Mon, 23 Apr 2012 06:30:45 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SMGXb-0005G7-U1 for ; Mon, 23 Apr 2012 10:30:43 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id DDECE2E8082 for ; Mon, 23 Apr 2012 10:30:43 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 23 Apr 2012 10:24:26 -0000 From: Alon Levy To: qemu-devel@nongnu.org X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Tags: spice X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: alonlevy1 sss123next X-Launchpad-Bug-Reporter: Alexandr (sss123next) X-Launchpad-Bug-Modifier: Alon Levy (alonlevy1) References: <20120422062629.11070.3154.malonedeb@wampee.canonical.com> Message-Id: <20120423102426.4127.8593.malone@gac.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15135"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 97af5c5c360366a0edf620343c1e26f70098dc06 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 91.189.90.7 X-Mailman-Approved-At: Mon, 23 Apr 2012 09:47:08 -0400 Subject: [Qemu-devel] [Bug 986770] Re: Oops: spice configured but not active X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Reply-To: Bug 986770 <986770@bugs.launchpad.net> 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 Seems commit ad1be89948f88e89708b04ccd782456ccec3a6f0 from qemu needs to go in to qemu-kvm. Could you try that and report if it fixes the issue for you? commit ad1be89948f88e89708b04ccd782456ccec3a6f0 Author: Alon Levy Date: Wed Mar 14 20:33:37 2012 +0200 spice: fix broken initialization Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM to way before MODULE_INIT_MACHINE, thereby breaking assumptions made in spice-core.c which registered both a type initializer and a machine intializer. This fix removes the type registration, and replaces it with calling qemu_spice_init in vl.c after command line parsing (second pass) is done, and after timers are armed, required by spice server. Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann diff --git a/ui/spice-core.c b/ui/spice-core.c index 80535b6..a468524 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -554,7 +554,7 @@ void qemu_spice_init(void) qemu_thread_get_self(&me); - if (!opts) { + if (!opts) { return; } port = qemu_opt_get_number(opts, "port", 0); @@ -787,10 +787,3 @@ static void spice_register_config(void) qemu_add_opts(&qemu_spice_opts); } machine_init(spice_register_config); - -static void spice_register_types(void) -{ - qemu_spice_init(); -} - -type_init(spice_register_types) diff --git a/vl.c b/vl.c index bd95539..eeb634b 100644 --- a/vl.c +++ b/vl.c @@ -3369,6 +3369,11 @@ int main(int argc, char **argv, char **envp) exit(1); } +#ifdef CONFIG_SPICE + /* spice needs the timers to be initialized by this point */ + qemu_spice_init(); +#endif + if (icount_option && (kvm_enabled() || xen_enabled())) { fprintf(stderr, "-icount is not allowed with kvm or xen\n"); exit(1);