From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ve2nE-0001S0-Ia for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:05:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ve2n8-0004es-K0 for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:05:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ve2n8-0004b0-CX for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:05:02 -0500 From: Juan Quintela Date: Wed, 6 Nov 2013 14:04:17 +0100 Message-Id: <1383743088-8139-9-git-send-email-quintela@redhat.com> In-Reply-To: <1383743088-8139-1-git-send-email-quintela@redhat.com> References: <1383743088-8139-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 08/39] exec: simplify notdirty_mem_write() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: chegu_vinod@hp.com We don't need to make special things for CODE, just set the other two bits Signed-off-by: Juan Quintela --- exec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 36b0a66..27e4540 100644 --- a/exec.c +++ b/exec.c @@ -1374,12 +1374,8 @@ found: static void notdirty_mem_write(void *opaque, hwaddr ram_addr, uint64_t val, unsigned size) { - - int dirty_flags; - dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr); if (!cpu_physical_memory_get_dirty_flag(ram_addr, CODE_DIRTY_FLAG)) { tb_invalidate_phys_page_fast(ram_addr, size); - dirty_flags = cpu_physical_memory_get_dirty_flags(ram_addr); } switch (size) { case 1: @@ -1394,8 +1390,8 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr, default: abort(); } - dirty_flags |= (0xff & ~CODE_DIRTY_FLAG); - cpu_physical_memory_set_dirty_flags(ram_addr, dirty_flags); + cpu_physical_memory_set_dirty_flag(ram_addr, MIGRATION_DIRTY_FLAG); + cpu_physical_memory_set_dirty_flag(ram_addr, VGA_DIRTY_FLAG); /* we remove the notdirty callback only if the code has been flushed */ if (cpu_physical_memory_is_dirty(ram_addr)) { -- 1.8.3.1