|
Hans de Goede |
56753f |
From 9f7bc0be9a5c353d076bb42b3bfdf77d8709063f Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
56753f |
From: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
56753f |
Date: Wed, 14 Mar 2012 20:33:37 +0200
|
|
Hans de Goede |
56753f |
Subject: [PATCH 428/434] spice: fix broken initialization
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Commit 1b71f7c14fab6f00c2680d4489fbee7baf796e4f moved MODULE_INIT_QOM to
|
|
Hans de Goede |
56753f |
way before MODULE_INIT_MACHINE, thereby breaking assumptions made in
|
|
Hans de Goede |
56753f |
spice-core.c which registered both a type initializer and a machine
|
|
Hans de Goede |
56753f |
intializer.
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
This fix removes the type registration, and replaces it with calling
|
|
Hans de Goede |
56753f |
qemu_spice_init in vl.c after command line parsing (second pass) is
|
|
Hans de Goede |
56753f |
done, and after timers are armed, required by spice server.
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
56753f |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
Conflicts:
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
ui/spice-core.c
|
|
Hans de Goede |
56753f |
---
|
|
Hans de Goede |
56753f |
ui/spice-core.c | 8 +-------
|
|
Hans de Goede |
56753f |
vl.c | 5 +++++
|
|
Hans de Goede |
56753f |
2 files changed, 6 insertions(+), 7 deletions(-)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
|
Hans de Goede |
56753f |
index 4ad0a67..a468524 100644
|
|
Hans de Goede |
56753f |
--- a/ui/spice-core.c
|
|
Hans de Goede |
56753f |
+++ b/ui/spice-core.c
|
|
Hans de Goede |
56753f |
@@ -554,7 +554,7 @@ void qemu_spice_init(void)
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
qemu_thread_get_self(&me);
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
- if (!opts) {
|
|
Hans de Goede |
56753f |
+ if (!opts) {
|
|
Hans de Goede |
56753f |
return;
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
port = qemu_opt_get_number(opts, "port", 0);
|
|
Hans de Goede |
56753f |
@@ -787,9 +787,3 @@ static void spice_register_config(void)
|
|
Hans de Goede |
56753f |
qemu_add_opts(&qemu_spice_opts);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
machine_init(spice_register_config);
|
|
Hans de Goede |
56753f |
-
|
|
Hans de Goede |
56753f |
-static void spice_initialize(void)
|
|
Hans de Goede |
56753f |
-{
|
|
Hans de Goede |
56753f |
- qemu_spice_init();
|
|
Hans de Goede |
56753f |
-}
|
|
Hans de Goede |
56753f |
-device_init(spice_initialize);
|
|
Hans de Goede |
56753f |
diff --git a/vl.c b/vl.c
|
|
Hans de Goede |
56753f |
index fdefa86..d33eb03 100644
|
|
Hans de Goede |
56753f |
--- a/vl.c
|
|
Hans de Goede |
56753f |
+++ b/vl.c
|
|
Hans de Goede |
56753f |
@@ -3271,6 +3271,11 @@ int main(int argc, char **argv, char **envp)
|
|
Hans de Goede |
56753f |
exit(1);
|
|
Hans de Goede |
56753f |
}
|
|
Hans de Goede |
56753f |
|
|
Hans de Goede |
56753f |
+#ifdef CONFIG_SPICE
|
|
Hans de Goede |
56753f |
+ /* spice needs the timers to be initialized by this point */
|
|
Hans de Goede |
56753f |
+ qemu_spice_init();
|
|
Hans de Goede |
56753f |
+#endif
|
|
Hans de Goede |
56753f |
+
|
|
Hans de Goede |
56753f |
if (icount_option && (kvm_enabled() || xen_enabled())) {
|
|
Hans de Goede |
56753f |
fprintf(stderr, "-icount is not allowed with kvm or xen\n");
|
|
Hans de Goede |
56753f |
exit(1);
|
|
Hans de Goede |
56753f |
--
|
|
Hans de Goede |
56753f |
1.7.10
|
|
Hans de Goede |
56753f |
|