From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJigL-0003pc-6J for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJigD-0005WT-CQ for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:34:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJigD-0005W9-4T for qemu-devel@nongnu.org; Wed, 11 Sep 2013 07:33:53 -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 r8BBXqrK015356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Sep 2013 07:33:52 -0400 From: Gerd Hoffmann Date: Wed, 11 Sep 2013 13:33:39 +0200 Message-Id: <1378899220-7631-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1378899220-7631-1-git-send-email-kraxel@redhat.com> References: <1378899220-7631-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] qxl: simplify page dirtying List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, famz@redhat.com, Gerd Hoffmann No need to do target page size calculations here, memory_region_set_dirty will care for us. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index bcbf97a..ee2db0d 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -414,9 +414,8 @@ static void qxl_ram_set_dirty(PCIQXLDevice *qxl, void *ptr) intptr_t offset; offset = ptr - base; - offset &= ~(TARGET_PAGE_SIZE-1); assert(offset < qxl->vga.vram_size); - qxl_set_dirty(&qxl->vga.vram, offset, offset + TARGET_PAGE_SIZE); + qxl_set_dirty(&qxl->vga.vram, offset, offset + 3); } /* can be called from spice server thread context */ -- 1.8.3.1