From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMahX-0004Al-Up for qemu-devel@nongnu.org; Thu, 19 Sep 2013 05:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMahP-0003XL-BS for qemu-devel@nongnu.org; Thu, 19 Sep 2013 05:39:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMahP-0003X3-4V for qemu-devel@nongnu.org; Thu, 19 Sep 2013 05:38:59 -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 r8J9cw0e005371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 19 Sep 2013 05:38:58 -0400 From: Gerd Hoffmann Date: Thu, 19 Sep 2013 11:38:53 +0200 Message-Id: <1379583534-7831-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1379583534-7831-1-git-send-email-kraxel@redhat.com> References: <1379583534-7831-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: 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