diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2022-03-21 09:07:08 +0100 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2022-03-21 11:37:11 +0100 |
commit | ab9ad87c5f99bed397a6642965e3315d138e7761 (patch) | |
tree | 8bea7c87cbf471c4319f14b4a89a8958eee7c172 | |
parent | b24e2ea68e34a1b00298d818af594f656d4bdf47 (diff) |
Revert "reds: start QXL devices if VM is running" (fix race)
Due to reds->vm_running being initialized to TRUE (since c302e12c
"spice.h: add entries for tracking vm state") the assumption in c23cbd6f
"reds: start QXL devices if VM is running" was wrong and we can't check
on vm_running until that initialization isn't on TRUE (it is that way for
backward compatibility).
Without this revert on qemu initializing spice we will have the
display_init side of qemu not yet ready and therefore respond badly when
spice sends an event as reaction to `red_qxl_start`:
"qxl_send_events: spice-server bug: guest stopped, ignoring."
At least with qemu > v2.0 as a spice consumer is not showing issues as
`red_qxl_start` will be called just after the qemu side is ready
`qemu_spice_display_start` -> `spice_server_vm_start` ... `red_qxl_start`.
Therefore - for now to avoid the current regression - Revert c23cbd6f
"reds: start QXL devices if VM is running" until that old (2012)
initialization is updated (probably an ABI change and therefore taking
some time).
Fixes: https://gitlab.freedesktop.org/spice/spice/-/issues/64
This reverts commit c23cbd6fa821fea8ac4ed97ca679afebe2333c8c.
-rw-r--r-- | server/reds.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/server/reds.cpp b/server/reds.cpp index 11eb4cb2..1ada47d8 100644 --- a/server/reds.cpp +++ b/server/reds.cpp @@ -3244,9 +3244,6 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds, * be called. */ red_qxl_attach_worker(qxl); red_qxl_set_compression_level(qxl, calc_compression_level(reds)); - if (reds->vm_running) { - red_qxl_start(qxl); - } } else if (strcmp(base_interface->type, SPICE_INTERFACE_TABLET) == 0) { SpiceTabletInstance *tablet = SPICE_UPCAST(SpiceTabletInstance, sin); spice_debug("SPICE_INTERFACE_TABLET"); |