From patchwork Mon Feb 4 10:41:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 217904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CF6352C02A7 for ; Mon, 4 Feb 2013 23:55:05 +1100 (EST) Received: from localhost ([::1]:38006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JXH-0008SE-Gt for incoming@patchwork.ozlabs.org; Mon, 04 Feb 2013 05:44:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JWv-0007xI-Dg for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2JWs-0001SW-D8 for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:44:05 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:59591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JWs-0001SB-5g; Mon, 04 Feb 2013 05:44:02 -0500 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 5A405A03F0; Mon, 4 Feb 2013 14:44:01 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 88AE9548; Mon, 4 Feb 2013 14:41:29 +0400 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2013 14:41:03 +0400 Message-Id: <1359974470-17044-54-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Michael Tokarev , Doug Goldstein , Alon Levy , qemu-stable@nongnu.org, Gerd Hoffmann Subject: [Qemu-devel] [PATCH 53/60] hw/qxl: qxl_send_events: nop if stopped X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alon Levy Added a trace point for easy logging. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=870972 Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann (cherry picked from commit 511aefb0c60e3063ead76d4ba6aabf619eed18ef) Conflicts: hw/qxl.c trace-events Cc: Doug Goldstein Signed-off-by: Michael Tokarev --- hw/qxl.c | 8 +++++++- trace-events | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index b971ac7..ed70e6b 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1514,7 +1514,13 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t events) uint32_t old_pending; uint32_t le_events = cpu_to_le32(events); - assert(d->ssd.running); + if (!d->ssd.running) { + /* spice-server tracks guest running state and should not do this */ + fprintf(stderr, "%s: spice-server bug: guest stopped, ignoring\n", + __func__); + trace_qxl_send_events_vm_stopped(d->id, events); + return; + } old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events); if ((old_pending & le_events) == le_events) { return; diff --git a/trace-events b/trace-events index 45c6bc1..c22665f 100644 --- a/trace-events +++ b/trace-events @@ -799,6 +799,7 @@ qxl_spice_reset_memslots(int qid) "%d" qxl_spice_update_area(int qid, uint32_t surface_id, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) "%d sid=%d [%d,%d,%d,%d]" qxl_spice_update_area_rest(int qid, uint32_t num_dirty_rects, uint32_t clear_dirty_region) "%d #d=%d clear=%d" qxl_surfaces_dirty(int qid, int surface, int offset, int size) "%d surface=%d offset=%d size=%d" +qxl_send_events_vm_stopped(int qid, uint32_t events) "%d %d" # hw/qxl-render.c qxl_render_blit_guest_primary_initialized(void) ""