* [Qemu-devel] [PATCH important] spice: fix broken initialization
@ 2012-03-14 18:33 Alon Levy
2012-03-19 12:09 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2012-03-14 18:33 UTC (permalink / raw)
To: qemu-devel, kraxel
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 <alevy@redhat.com>
---
ui/spice-core.c | 9 +--------
vl.c | 5 +++++
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/ui/spice-core.c b/ui/spice-core.c
index c1091e1..25bbf49 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -553,7 +553,7 @@ void qemu_spice_init(void)
qemu_thread_get_self(&me);
- if (!opts) {
+ if (!opts) {
return;
}
port = qemu_opt_get_number(opts, "port", 0);
@@ -781,10 +781,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);
--
1.7.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH important] spice: fix broken initialization
2012-03-14 18:33 [Qemu-devel] [PATCH important] spice: fix broken initialization Alon Levy
@ 2012-03-19 12:09 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2012-03-19 12:09 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel
On 03/14/12 19:33, Alon Levy wrote:
> 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.
Patch added to spice patch queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-19 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 18:33 [Qemu-devel] [PATCH important] spice: fix broken initialization Alon Levy
2012-03-19 12:09 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).