From patchwork Wed May 23 11:19:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 160911 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 7343EB6FBE for ; Wed, 23 May 2012 21:19:41 +1000 (EST) Received: from localhost ([::1]:58020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX9bP-00033q-8H for incoming@patchwork.ozlabs.org; Wed, 23 May 2012 07:19:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX9bD-00033K-RF for qemu-devel@nongnu.org; Wed, 23 May 2012 07:19:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX9b7-0001Uo-Jn for qemu-devel@nongnu.org; Wed, 23 May 2012 07:19:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX9b7-0001UV-C3 for qemu-devel@nongnu.org; Wed, 23 May 2012 07:19:21 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4NBJJ2T018946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 May 2012 07:19:20 -0400 Received: from garlic.redhat.com (vpn-203-13.tlv.redhat.com [10.35.203.13]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4NBJHEM028884; Wed, 23 May 2012 07:19:18 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Wed, 23 May 2012 14:19:16 +0300 Message-Id: <1337771956-27195-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kraxel@redhat.com, avi@redhat.com Subject: [Qemu-devel] [PATCH] qxl: stop dirty loging when not in vga mode 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 Tested with linux guest. Not sure how to check actual performance affect of this. Checked with the previously send traceevent that the kvm ioctl to start/stop dirty logging is being called. (KVM_SET_USER_MEMORY_REGION). Signed-off-by: Alon Levy --- hw/qxl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/qxl.c b/hw/qxl.c index 8ebab6f..cf21cbb 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -933,6 +933,7 @@ static void qxl_enter_vga_mode(PCIQXLDevice *d) qemu_spice_create_host_primary(&d->ssd); d->mode = QXL_MODE_VGA; memset(&d->ssd.dirty, 0, sizeof(d->ssd.dirty)); + vga_dirty_log_start(&d->vga); } static void qxl_exit_vga_mode(PCIQXLDevice *d) @@ -941,6 +942,7 @@ static void qxl_exit_vga_mode(PCIQXLDevice *d) return; } trace_qxl_exit_vga_mode(d->id); + vga_dirty_log_stop(&d->vga); qxl_destroy_primary(d, QXL_SYNC); }