Received: from eggs.gnu.org ([140.186.70.92]:41503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxfOd-00013z-O9 for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:59:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxfOU-00071U-8T for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:59:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxfOU-00071P-0X for qemu-devel@nongnu.org; Wed, 15 Feb 2012 08:59:38 -0500 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 q1FDxbps019045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Feb 2012 08:59:37 -0500 Date: Wed, 15 Feb 2012 15:59:32 +0200 From: Alon Levy Message-ID: <20120215135932.GU15812@garlic.tlv.redhat.com> References: <1329311466-20344-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1329311466-20344-1-git-send-email-kraxel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qxl: don't render stuff when the vm is stopped. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: yhalperi@redhat.com, qemu-devel@nongnu.org On Wed, Feb 15, 2012 at 02:11:06PM +0100, Gerd Hoffmann wrote: > This patch fixes the local qxl renderer to not kick spice-server in case > the vm is stopped. First it is pointless because we render evevything *everything > when the vm is stopped. Thus there is nothing to render anyway because > a stopped guest can hardly queue more commands. Second we avoid > triggering an assert in spice-server. > > With this patch applied it is possible to take screen shots (via > screendump monitor command) from a qxl gpu even in case the guest > is stopped. > Ack, just a minor request for the comment below. > Signed-off-by: Gerd Hoffmann > --- > hw/qxl-render.c | 12 +++++------- > 1 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/hw/qxl-render.c b/hw/qxl-render.c > index 133d093..7084143 100644 > --- a/hw/qxl-render.c > +++ b/hw/qxl-render.c > @@ -121,19 +121,17 @@ void qxl_render_update(PCIQXLDevice *qxl) > dpy_resize(vga->ds); > } > > - if (!qxl->guest_primary.commands) { > - return; > - } > - qxl->guest_primary.commands = 0; > - > update.left = 0; > update.right = qxl->guest_primary.surface.width; > update.top = 0; > update.bottom = qxl->guest_primary.surface.height; > > memset(dirty, 0, sizeof(dirty)); > - qxl_spice_update_area(qxl, 0, &update, > - dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC); > + if (runstate_is_running() && qxl->guest_primary.commands) { > + qxl->guest_primary.commands = 0; > + qxl_spice_update_area(qxl, 0, &update, > + dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC); > + } Can you update the comment to note that you are also changing it so even when there is no qxl_spice_update_area call you still honor the redraw request? > if (redraw) { > memset(dirty, 0, sizeof(dirty)); > dirty[0] = update; > -- > 1.7.1 > >