Marc-André Lureau a703d3aef5 qxl: switch display on entering VGA
Since commit cd958edb1fae85d, same size console resize is skipped. This
change broke QXL incoming migration in VGA mode,
qemu_spice_display_switch() is no longer called during qxl_post_load(),
because default message surface is of the same size, and during
displaychangelistener registration, PCIQXLDevice.mode is
QXL_MODE_UNDEFINED. This triggers a later crash on refresh:

==2634== Invalid read of size 4
==3516== at 0x65F3050: pixman_image_get_data (in /usr/lib64/libpixman-1.so.0.34.0)
==3516== by 0x6F0CEB: qemu_spice_create_update (spice-display.c:215)
==3516== by 0x6F1CC7: qemu_spice_display_refresh (spice-display.c:502)
==3516== by 0x58CF77: display_refresh (qxl.c:1948)
==3516== by 0x6E8084: do_safe_dpy_refresh (console.c:1591)
==3516== by 0x6E80D5: dpy_refresh (console.c:1604)
==3516== by 0x6E4508: gui_update (console.c:201)
==3516== by 0x81898E: timerlist_run_timers (qemu-timer.c:536)
==3516== by 0x8189D6: qemu_clock_run_timers (qemu-timer.c:547)
==3516== by 0x818D98: qemu_clock_run_all_timers (qemu-timer.c:662)
==3516== by 0x81952A: main_loop_wait (main-loop.c:514)
==3516== by 0x4ADD29: main_loop (vl.c:1898)

One way to solve this is to explicitely call qemu_spice_display_switch()
on entering VGA mode, which is called during qxl_post_load().

Fixes:
"null pointer access on migration resume of systemrescuecd boot menu with qxl-vga"
https://bugs.launchpad.net/qemu/+bug/1679126
https://bugzilla.redhat.com/show_bug.cgi?id=1438566

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20170406120513.638-4-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-04-07 12:31:46 +02:00
..
2017-04-05 17:23:52 +02:00
2016-10-04 13:28:07 +01:00
2017-01-27 18:08:00 +01:00
2017-01-20 11:15:06 +00:00
2017-03-27 12:14:45 +02:00
2016-05-18 15:04:27 +03:00
2017-04-02 21:17:47 +02:00
2017-04-05 17:23:52 +02:00
2017-01-27 18:07:59 +01:00
2017-02-24 10:37:21 +00:00
2017-03-31 08:48:13 +08:00
2017-02-28 20:40:36 +01:00
2017-02-02 18:48:06 +00:00
2017-02-24 10:13:57 +00:00
2016-01-29 15:07:25 +00:00
2017-03-27 17:34:50 +01:00
2017-03-01 23:09:46 +00:00
2017-02-28 16:18:49 +00:00
2016-10-28 18:17:24 +03:00
2016-09-15 15:32:22 +03:00