spice/server
Jonathon Jongsma eb3d2bfcfd Don't close all but one display during reboot.
When a guest is rebooted, the QXL driver gets unloaded at some point in
the reboot process. When the driver is unloaded, the spice server sets a
single flag to FALSE: RedWorker::driver_cap_monitors_config. This flag
indicates whether the driver is capable of sending its own monitors config
messages to the client.

The only place this flag is used is when a new primary surface is created. If
this flag is true, the server assumes that the driver will send its own
monitors config very soon after the surface is created. If it's false, the
server directly sends its own temporary monitors config message to the client
based on the size of the just-created primary surface. This temporary monitors
config message always has a maximum monitor count of 1.

This flag is set to false at startup so that in early boot (e.g. vga text
mode), the server will send out these 'temporary' monitor config messages to
the client whenever the primary surface is destroyed and re-created. This
causes the client to resize its window to match the size of the guest. When the
QXL driver is loaded and starts taking over the monitors config
responsibilities, we set this flag to true and the server stops sending
monitors config messages out on its own.

If we reboot and set this flag to false, it will result in the server sending a
monitors config message to the client indicating that the guest now supports a
maximum of 1 monitor. If the guest happens to have more than one display window
open, it will destroy those extra windows because they exceed the maximum
allowed number of monitors. This means that if you reboot a guest with 4
monitors, after reboot it will only have 1 monitor.

To avoid this, we assume that if we had the ability to support multiple
monitors at some point, that will return at some point. So when the server
constructs its own monitors config message to send to the client (when the
driver_cap_monitors_config flag is false), we send the previous maximum monitor
count instead of always sending a maximum of 1.

Resolves: rhbz#1274447
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-05-25 11:56:21 -05:00
..
tests red-parse-qxl: s/true/false 2017-05-02 11:30:47 +02:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Fix minor inconsistencies with declaration and definition 2017-02-16 10:28:52 +00:00
agent-msg-filter.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.tmpl.c Use SPICE_VERIFY macro for RHEL6 compatibility 2016-11-14 17:22:02 +00:00
char-device.c Introduce WriteBufferOrigin enum typedef 2017-04-28 16:59:25 +02:00
char-device.h Make RedCharDeviceWriteBuffer::refs private 2017-04-28 16:59:25 +02:00
common-graphics-channel.c reds-stream: Introduce reds_stream_set_no_delay() helper 2017-03-31 12:22:36 +02:00
common-graphics-channel.h Unify header guards 2017-03-30 18:17:20 +01:00
cursor-channel-client.c Don't set RedChannelClient::monitor-latency to FALSE 2017-03-30 18:17:13 +01:00
cursor-channel-client.h Unify header guards 2017-03-30 18:17:20 +01:00
cursor-channel.c cursor-channel: Change cursor_visible type to bool 2017-05-22 14:34:19 +01:00
cursor-channel.h Unify header guards 2017-03-30 18:17:20 +01:00
dcc-private.h Unify header guards 2017-03-30 18:17:20 +01:00
dcc-send.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
dcc.c Add "fall through" comments where necessary 2017-05-16 13:42:51 +01:00
dcc.h Unify header guards 2017-03-30 18:17:20 +01:00
demarshallers.h Unify header guards 2017-03-30 18:17:20 +01:00
dispatcher.c dispatcher: write_safe: move EINTR debug message 2016-12-06 16:45:11 +00:00
dispatcher.h Unify header guards 2017-03-30 18:17:20 +01:00
display-channel-private.h Improve statistic code interface 2017-02-15 10:13:48 +00:00
display-channel.c Don't close all but one display during reboot. 2017-05-25 11:56:21 -05:00
display-channel.h Make various functions static 2017-04-05 12:39:20 +02:00
display-limits.h Unify header guards 2017-03-30 18:17:20 +01:00
event-loop.c Remove core_public and core_interface_adapter globals usage 2016-11-15 16:49:09 +00:00
glib-compat.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c Fix -Werror=format with DEBUG_ENCODE 2016-07-01 14:00:37 +02:00
glz-encoder-dict.c Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-dict.h Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-priv.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
gstreamer-encoder.c gstreamer: Remove some leaks if pipeline cannot be created 2017-04-07 16:45:49 +01:00
image-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
image-encoders.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-encoders.h Unify header guards 2017-03-30 18:17:20 +01:00
inputs-channel-client.c Remove unused "monitor_latency" arguments 2017-03-30 18:17:05 +01:00
inputs-channel-client.h Unify header guards 2017-03-30 18:17:20 +01:00
inputs-channel.c inputs: add SCAN_CODE_RELEASE define 2017-05-18 18:26:46 +01:00
inputs-channel.h Unify header guards 2017-03-30 18:17:20 +01:00
jpeg-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
jpeg-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
lz4-encoder.c Use LZ4_compress_fast_continue if available 2016-11-28 18:38:22 +00:00
lz4-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
main-channel-client.c Use enum rather than int in MainChannelClientPrivate::net_test_stage 2017-04-26 17:44:22 +02:00
main-channel-client.h Unify header guards 2017-03-30 18:17:20 +01:00
main-channel.c Test client caps separately 2017-04-07 15:08:43 -05:00
main-channel.h Unify header guards 2017-03-30 18:17:20 +01:00
main-dispatcher.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
main-dispatcher.h Unify header guards 2017-03-30 18:17:20 +01:00
Makefile.am reds-stream: Introduce reds_stream_set_no_delay() helper 2017-03-31 12:22:36 +02:00
memslot.c Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
memslot.h Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
migration-protocol.h Unify header guards 2017-03-30 18:17:20 +01:00
mjpeg-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
net-utils.c build-sys: Add configure check for TCP_KEEPIDLE 2017-03-31 12:22:52 +02:00
net-utils.h reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
pixmap-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
pixmap-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-capabilities.c Initialize earlier GLib type system if necessary 2017-03-30 18:05:30 +01:00
red-channel-capabilities.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-client.c Remove redundant code from red_channel_client_msg_sent() 2017-04-28 16:59:25 +02:00
red-channel-client.h red_channel_client_test_remote_cap() returns bool 2017-04-07 15:08:43 -05:00
red-channel.c Remove unused red_channel_test_remote_common_cap() 2017-04-07 15:08:43 -05:00
red-channel.h Remove unused red_channel_test_remote_common_cap() 2017-04-07 15:08:43 -05:00
red-client.c Make various functions static 2017-04-05 12:39:20 +02:00
red-client.h Make various functions static 2017-04-05 12:39:20 +02:00
red-common.h Unify header guards 2017-03-30 18:17:20 +01:00
red-parse-qxl.c red-parse-qxl: s/true/false 2017-05-02 11:30:47 +02:00
red-parse-qxl.h red-parse-qxl: Change int/1/0 to bool/true/false 2017-05-02 11:30:43 +02:00
red-pipe-item.c MainChannel: remove another init_send_data arg 2016-12-20 16:11:13 +00:00
red-pipe-item.h Unify header guards 2017-03-30 18:17:20 +01:00
red-qxl.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-qxl.h Unify header guards 2017-03-30 18:17:20 +01:00
red-record-qxl.c Fix minor incompatibilities with RHEL6 2017-03-30 10:50:09 +01:00
red-record-qxl.h Unify header guards 2017-03-30 18:17:20 +01:00
red-replay-qxl.c Remove stdbool.h include from .c files 2017-03-09 18:39:13 +01:00
red-worker.c red-parse-qxl: s/true/false 2017-05-02 11:30:47 +02:00
red-worker.h Unify header guards 2017-03-30 18:17:20 +01:00
reds-private.h reds: Remove only assigned 'mcc' field 2017-05-18 16:30:08 +01:00
reds-stream.c reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
reds-stream.h reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
reds.c reds: Remove only assigned 'mcc' field 2017-05-18 16:30:08 +01:00
reds.h Change playback_compression to bool type 2017-04-07 15:08:43 -05:00
smartcard-channel-client.c Remove unused "monitor_latency" arguments 2017-03-30 18:17:05 +01:00
smartcard-channel-client.h Unify header guards 2017-03-30 18:17:20 +01:00
smartcard.c Remove unused "monitor_latency" arguments 2017-03-30 18:17:05 +01:00
smartcard.h Unify header guards 2017-03-30 18:17:20 +01:00
sound.c sound: don't store client in SndChannel 2017-05-02 10:10:35 -05:00
sound.h Change playback_compression to bool type 2017-04-07 15:08:43 -05:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Attempt to create bitmap debug directory 2017-04-07 16:45:54 +01:00
spice-bitmap-utils.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-experimental.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h Revert accidentally merged experimental patches 2016-11-09 13:54:58 +00:00
spice-replay.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-server-enums.tmpl.c syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server-enums.tmpl.h syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c spicevmc: Remove useless check 2017-05-03 12:35:13 +01:00
stat-file.c stat-file: Avoid compiler warning 2017-02-03 18:13:22 +00:00
stat-file.h Unify header guards 2017-03-30 18:17:20 +01:00
stat.h Unify header guards 2017-03-30 18:17:20 +01:00
stream.c red_channel_client_test_remote_cap() returns bool 2017-04-07 15:08:43 -05:00
stream.h Unify header guards 2017-03-30 18:17:20 +01:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
tree.h Unify header guards 2017-03-30 18:17:20 +01:00
utils.c worker: move dcc_add_surface_area_image 2015-11-23 13:50:44 +00:00
utils.h Unify header guards 2017-03-30 18:17:20 +01:00
video-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
zlib-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
zlib-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00