From c23cbd6fa821fea8ac4ed97ca679afebe2333c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 28 Jan 2021 13:59:24 +0400 Subject: [PATCH] reds: start QXL devices if VM is running MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like char devices, QXL devices need to be explicily started. For some historical reason, char devices are started when in running state. See commi bf1d9007b. Reading that commit comments, there was a plan to provide an API to stop/start devices invidually, but that never happened. Whether that API would really be useful now, I wonder. For now, just follow the char devices behaviour and start QXL devices added when vm_running. Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio --- server/reds.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/reds.cpp b/server/reds.cpp index f61086cb..31a02ce2 100644 --- a/server/reds.cpp +++ b/server/reds.cpp @@ -3255,6 +3255,9 @@ 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");