|
|
9ae3a8 |
From 4997362f21fdf91a47dbcce2c8c27fcad673d21a Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 5 Sep 2014 12:30:37 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 03/12] spice: stop server for qxl hard reset
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1409920238-9070-4-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 60876
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.1 qemu-kvm PATCH 3/4] spice: stop server for qxl hard reset
|
|
|
9ae3a8 |
Bugzilla: 1054077
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Hard reset can happen at any time. We should be able to put qxl into a
|
|
|
9ae3a8 |
known-good state no matter what. Stop spice server thread for reset so
|
|
|
9ae3a8 |
it can't be confused by fetching stale commands lingering around in the
|
|
|
9ae3a8 |
rings while we reset is ongoing.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 75c70e37bc4a6bdc394b4d1b163fe730abb82c72)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/display/qxl.c | 10 ++++++++++
|
|
|
9ae3a8 |
1 file changed, 10 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/display/qxl.c | 10 ++++++++++
|
|
|
9ae3a8 |
1 files changed, 10 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
|
|
|
9ae3a8 |
index 4fe4f1b..6f8adc8 100644
|
|
|
9ae3a8 |
--- a/hw/display/qxl.c
|
|
|
9ae3a8 |
+++ b/hw/display/qxl.c
|
|
|
9ae3a8 |
@@ -1146,8 +1146,14 @@ static void qxl_soft_reset(PCIQXLDevice *d)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
+ bool startstop = qemu_spice_display_is_running(&d->ssd);
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
trace_qxl_hard_reset(d->id, loadvm);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+ if (startstop) {
|
|
|
9ae3a8 |
+ qemu_spice_display_stop();
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
qxl_spice_reset_cursor(d);
|
|
|
9ae3a8 |
qxl_spice_reset_image_cache(d);
|
|
|
9ae3a8 |
qxl_reset_surfaces(d);
|
|
|
9ae3a8 |
@@ -1161,6 +1167,10 @@ static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
qemu_spice_create_host_memslot(&d->ssd);
|
|
|
9ae3a8 |
qxl_soft_reset(d);
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ if (startstop) {
|
|
|
9ae3a8 |
+ qemu_spice_display_start();
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void qxl_reset_handler(DeviceState *dev)
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|