[Spice-commits] server/reds.cpp

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 23 09:23:10 UTC 2022


 server/reds.cpp |    3 ---
 1 file changed, 3 deletions(-)

New commits:
commit ab9ad87c5f99bed397a6642965e3315d138e7761
Author: Christian Ehrhardt <christian.ehrhardt at canonical.com>
Date:   Mon Mar 21 09:07:08 2022 +0100

    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.

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");


More information about the Spice-commits mailing list