提交 641381c1 编写于 作者: G Gerd Hoffmann

spice: don't update mm_time when spice-server is stopped.

Skip mm_time updates (in qxl device memory) in case the guest is stopped.
Guest isn't able to look anyway, and it causes problems with migration.

Also make sure the initial state for spice server is stopped.
Reported-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 e95e203c
...@@ -504,6 +504,10 @@ static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time) ...@@ -504,6 +504,10 @@ static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time)
{ {
PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
if (!qemu_spice_display_is_running(&qxl->ssd)) {
return;
}
trace_qxl_interface_set_mm_time(qxl->id, mm_time); trace_qxl_interface_set_mm_time(qxl->id, mm_time);
qxl->shadow_rom.mm_clock = cpu_to_le32(mm_time); qxl->shadow_rom.mm_clock = cpu_to_le32(mm_time);
qxl->rom->mm_clock = cpu_to_le32(mm_time); qxl->rom->mm_clock = cpu_to_le32(mm_time);
......
...@@ -804,6 +804,7 @@ void qemu_spice_init(void) ...@@ -804,6 +804,7 @@ void qemu_spice_init(void)
qemu_spice_audio_init(); qemu_spice_audio_init();
qemu_add_vm_change_state_handler(vm_change_state_handler, NULL); qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
qemu_spice_display_stop();
g_free(x509_key_file); g_free(x509_key_file);
g_free(x509_cert_file); g_free(x509_cert_file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册