summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDor Laor <dlaor@redhat.com>2009-07-29 17:20:24 +0300
committerEduardo Habkost <ehabkost@redhat.com>2009-07-29 14:11:51 -0300
commitcea092a88b1fc02f130b536ea9b3e949e2301646 (patch)
tree34401b3fb8bd880a4299d155f7f64fb913f9345f
parentee49f80b360dd57acc61df1694fc7ea798ffa485 (diff)
Work around VM state change handlers running out of order.
Here is a new patch, written by Yaniv, acked by myself: >From 6253b79afa02e87e016b2dd4cfae4fb83897c4dd Mon Sep 17 00:00:00 2001 From: Yaniv Kamay <ykamay@redhat.com> Date: Wed, 29 Jul 2009 17:16:31 +0300 Subject: [PATCH] Work around VM state change handlers running out of order. Bug 511038 Instead of issuing large scale change, just fix the effected devices. Signed-off-by: Yaniv Kamay <ykamay@redhat.com> Signed-off-by: Dor Laor <dor@redhat.com> Message-ID: <4A705AA8.4090504@redhat.com> Obsoletes: <87my6ovbt0.fsf@pike.pond.sub.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 511038 RH-Upstream-status: not-applicable Acked-by: Dor Laor <dor@redhat.com> Acked-by: "Yonit Halperin" <yhalperi@redhat.com> Acked-by: Izik Eidus <ieidus@redhat.com> Acked-by: Arnon Gilboa <agilboa@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--qemu/hw/qxl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/qemu/hw/qxl.c b/qemu/hw/qxl.c
index 8a02d073..c3322b5c 100644
--- a/qemu/hw/qxl.c
+++ b/qemu/hw/qxl.c
@@ -1414,6 +1414,10 @@ static void qxl_vm_change_state_handler(void *opaque, int running)
printf("QXL: %s: running=%d\n", __FUNCTION__, running);
+ if (running == d->state.running) {
+ return;
+ }
+
if (running) {
d->state.running = TRUE;
qemu_set_fd_handler(d->pipe_fd[0], qxl_pipe_read, NULL, d);
@@ -1825,6 +1829,10 @@ static void vdi_port_vm_change_state_handler(void *opaque, int running)
{
PCIVDIPortDevice* d=(PCIVDIPortDevice*)opaque;
+ if (running == d->running ) {
+ return;
+ }
+
if (running) {
d->running = TRUE;
if (d->new_gen_on_resume) {