aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-14 14:11:17 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-10-15 11:14:40 +0200
commit93ab5844b2cd5367966d7b5bae154e0d3303b504 (patch)
treefdc01b73d9999cb0970d77105fd24a44b25efceb /softmmu
parent70122d62302c97bcd205956a544b8e79f2a4a50f (diff)
chardev/spice: simplify chardev setup
Initialize spice before chardevs. That allows to register the spice chardevs directly in the init function and removes the need to maintain a linked list of chardevs just for registration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20201014121120.13482-5-kraxel@redhat.com
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 254ee5e525..cb476aa70b 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4148,6 +4148,11 @@ void qemu_init(int argc, char **argv, char **envp)
user_creatable_add_opts_foreach,
object_create_initial, &error_fatal);
+ /* spice needs the timers to be initialized by this point */
+ /* spice must initialize before audio as it changes the default auiodev */
+ /* spice must initialize before chardevs (for spicevmc and spiceport) */
+ qemu_spice_init();
+
qemu_opts_foreach(qemu_find_opts("chardev"),
chardev_init_func, NULL, &error_fatal);
@@ -4156,10 +4161,6 @@ void qemu_init(int argc, char **argv, char **envp)
fsdev_init_func, NULL, &error_fatal);
#endif
- /* spice needs the timers to be initialized by this point */
- /* spice must initialize before audio as it changes the default auiodev */
- qemu_spice_init();
-
/*
* Note: we need to create audio and block backends before
* machine_set_property(), so machine properties can refer to