From patchwork Fri Jun 24 13:02:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 101800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 85ACCB6F7E for ; Sat, 25 Jun 2011 00:01:58 +1000 (EST) Received: from localhost ([::1]:36187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa6xG-00053b-Tl for incoming@patchwork.ozlabs.org; Fri, 24 Jun 2011 10:01:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa62d-00064H-3a for qemu-devel@nongnu.org; Fri, 24 Jun 2011 09:03:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa62a-0001rd-Nf for qemu-devel@nongnu.org; Fri, 24 Jun 2011 09:03:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa62a-0001qv-3O for qemu-devel@nongnu.org; Fri, 24 Jun 2011 09:03:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5OD3Jpo023445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 Jun 2011 09:03:19 -0400 Received: from bow.redhat.com (vpn-11-77.rdu.redhat.com [10.11.11.77]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5OD34T2021276; Fri, 24 Jun 2011 09:03:17 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2011 15:02:52 +0200 Message-Id: <1308920577-31569-8-git-send-email-alevy@redhat.com> In-Reply-To: <1308920577-31569-1-git-send-email-alevy@redhat.com> References: <1308920577-31569-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: yhalperi@redhat.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCH v2] qxl: update and add debug prints 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 --- hw/qxl.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 96f9c55..865e985 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -361,7 +361,7 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext) switch (qxl->mode) { case QXL_MODE_VGA: - dprint(qxl, 2, "%s: vga\n", __FUNCTION__); + dprint(qxl, 4, "%s: vga\n", __FUNCTION__); ret = false; qemu_mutex_lock(&qxl->ssd.lock); if (qxl->ssd.update != NULL) { @@ -700,7 +700,8 @@ static void qxl_hard_reset(PCIQXLDevice *d, int loadvm) qemu_spice_create_host_memslot(&d->ssd); qxl_soft_reset(d); - dprint(d, 1, "%s: done\n", __FUNCTION__); + dprint(d, 1, "%s: done (num_free_res %d, %p)\n", __FUNCTION__, + d->num_free_res, d->last_release); } static void qxl_reset_handler(DeviceState *dev) @@ -1040,6 +1041,7 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val) } pthread_yield(); if (!SPICE_RING_IS_EMPTY(&d->ram->release_ring)) { + dprint(d, 1, "QXL_IO_NOTIFY_OOM (return after pthread_yield)\n"); break; } d->oom_running = 1; @@ -1057,7 +1059,8 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val) } break; case QXL_IO_RESET: - dprint(d, 1, "QXL_IO_RESET\n"); + dprint(d, 1, "QXL_IO_RESET %d (%p)\n", d->num_free_res, + d->last_release); qxl_hard_reset(d, 0); break; case QXL_IO_MEMSLOT_ADD: @@ -1073,6 +1076,7 @@ static void ioport_write(void *opaque, uint32_t addr, uint32_t val) break; } case QXL_IO_MEMSLOT_DEL: + dprint(d, 1, "QXL_IO_MEMSLOT_DEL %d\n", val); qxl_del_memslot(d, val); break; case QXL_IO_CREATE_PRIMARY: