From patchwork Thu May 30 09:29:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 1107649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45F2T90pQtz9s5c for ; Thu, 30 May 2019 19:33:49 +1000 (AEST) Received: from localhost ([127.0.0.1]:49959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWHRT-0003Fr-2G for incoming@patchwork.ozlabs.org; Thu, 30 May 2019 05:33:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWHNV-0000lS-7d for qemu-devel@nongnu.org; Thu, 30 May 2019 05:29:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWHNU-0001P8-8K for qemu-devel@nongnu.org; Thu, 30 May 2019 05:29:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWHNU-0001OQ-2z for qemu-devel@nongnu.org; Thu, 30 May 2019 05:29:40 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BB735AFD9 for ; Thu, 30 May 2019 09:29:39 +0000 (UTC) Received: from xz-x1.redhat.com (ovpn-12-221.pek2.redhat.com [10.72.12.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26DD510027C7; Thu, 30 May 2019 09:29:35 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 17:29:10 +0800 Message-Id: <20190530092919.26059-4-peterx@redhat.com> In-Reply-To: <20190530092919.26059-1-peterx@redhat.com> References: <20190530092919.26059-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 30 May 2019 09:29:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 03/12] memory: Remove memory_region_get_dirty() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Paolo Bonzini , "Dr . David Alan Gilbert" , peterx@redhat.com, Juan Quintela Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It's never used anywhere. Reviewed-by: Paolo Bonzini Signed-off-by: Peter Xu Reviewed-by: Juan Quintela --- include/exec/memory.h | 17 ----------------- memory.c | 8 -------- 2 files changed, 25 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 9144a47f57..e6140e8a04 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1254,23 +1254,6 @@ void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, */ void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client); -/** - * memory_region_get_dirty: Check whether a range of bytes is dirty - * for a specified client. - * - * Checks whether a range of bytes has been written to since the last - * call to memory_region_reset_dirty() with the same @client. Dirty logging - * must be enabled. - * - * @mr: the memory region being queried. - * @addr: the address (relative to the start of the region) being queried. - * @size: the size of the range being queried. - * @client: the user of the logging information; %DIRTY_MEMORY_MIGRATION or - * %DIRTY_MEMORY_VGA. - */ -bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr, - hwaddr size, unsigned client); - /** * memory_region_set_dirty: Mark a range of bytes as dirty in a memory region. * diff --git a/memory.c b/memory.c index 3071c4bdad..0920c105aa 100644 --- a/memory.c +++ b/memory.c @@ -2027,14 +2027,6 @@ void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client) memory_region_transaction_commit(); } -bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr, - hwaddr size, unsigned client) -{ - assert(mr->ram_block); - return cpu_physical_memory_get_dirty(memory_region_get_ram_addr(mr) + addr, - size, client); -} - void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size) {