From nobody Mon Feb 9 17:24:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518525830604990.810363369858; Tue, 13 Feb 2018 04:43:50 -0800 (PST) Received: from localhost ([::1]:51584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elZw5-0005H0-IO for importer@patchew.org; Tue, 13 Feb 2018 07:43:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elZI0-0004dQ-GV for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elZHz-0007tJ-JG for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:24 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:38121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elZHz-0007sv-CL for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:23 -0500 Received: by mail-wr0-x243.google.com with SMTP id t94so18347922wrc.5 for ; Tue, 13 Feb 2018 04:02:23 -0800 (PST) Received: from 640k.lan ([82.84.102.245]) by smtp.gmail.com with ESMTPSA id f9sm6870298wmf.12.2018.02.13.04.02.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 04:02:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=yb1cQLU8sxysnmAy7hi+2XIaHmXE/PXqIG6aevP9jjc=; b=OQaDMFu7m7mNr9B9nEsPl3u5+RshTHmP3DXvGZBhnpLCUaVmhQTsu21051+eiF78yA gOPjKYgXKVBDIoKnBEFGqbRkkTNzTKHYfAagsVAqOduqDqTfvoTge4jhib8TkCV7+Fhd T7zT/vdgIMg55g83KCg+7ZEvUpj0NfH0g7bgc93VyCKScrvEzssfhh7cQgNoJ8uq1U5X YdtjzRrlX0DtzwWW3+7zhURYckCNRn8P4iysvs9SKJYCQ9iKHpXPAnEcVK+hARV98+Hk LG11FToI4qi2kFn2dx0q82Euz4qYAMKB8Csy3jOpJj5RAaVCfxSd5qlsRO7RlFmFGlyg l2Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=yb1cQLU8sxysnmAy7hi+2XIaHmXE/PXqIG6aevP9jjc=; b=lStST5XFOcW7QcSibl7k6DbHGBmR9GWUQF++Vo0rFO4T8G4Eg5b4jZiWhdtcSkKI98 PEL9UEYglyyrPJ3ggihXS6Uily/pKk8pw2NzGFF/FffIsC/uh2XXP7bP20oD2+v6r4aO 5OHbB9fXjKSLt5ROjYP7vzdQTWV91/GVfMoQ7uvnki4qUtKu069cKcvuPsjwaNynuXlV zTEuq/lDR88wNpBW2FIPXxFrOOLINoqc9quy9kyXoO015NTLgEoVtII8oxLSR9cK0ubQ JcSb9zjCf3e5BH2vI0yPng+V9U1zX3EnZZeqdrXh9hxBgwLEpCkjrq3o9hnEsewHUBMj GhYg== X-Gm-Message-State: APf1xPCZblban4sbYm5JNM6D8fUcoMmS/2lsbm8BC7ACB3QshZgkSuQm bn6A7/0IAZEoSFjmw9IUzMvP+9C4 X-Google-Smtp-Source: AH8x226zmtmu6p8EuMVPhg57ie1XfNzyGjsGRDMbLTjWKlmtE1s/usF+UGS4EtYscvoJ4CxRezYLtA== X-Received: by 10.223.135.178 with SMTP id b47mr1065782wrb.108.1518523341992; Tue, 13 Feb 2018 04:02:21 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Feb 2018 13:00:49 +0100 Message-Id: <1518523252-49106-46-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> References: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 45/48] memory: remove memory_region_test_and_clear_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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It is unused after g364fb has been converted to use DirtyBitmapSnapshot. Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 24 +++--------------------- memory.c | 8 -------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 783ef64..6779d14 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1091,32 +1091,14 @@ void memory_region_set_dirty(MemoryRegion *mr, hwad= dr addr, hwaddr size); =20 /** - * memory_region_test_and_clear_dirty: Check whether a range of bytes is d= irty - * for a specified client. It clears t= hem. - * - * Checks whether a range of bytes has been written to since the last - * call to memory_region_reset_dirty() with the same @client. Dirty loggi= ng - * 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_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, - hwaddr size, unsigned client); - -/** * memory_region_snapshot_and_clear_dirty: Get a snapshot of the dirty * bitmap and clear it. * * Creates a snapshot of the dirty bitmap, clears the dirty bitmap and * returns the snapshot. The snapshot can then be used to query dirty - * status, using memory_region_snapshot_get_dirty. Unlike - * memory_region_test_and_clear_dirty this allows to query the same - * page multiple times, which is especially useful for display updates - * where the scanlines often are not page aligned. + * status, using memory_region_snapshot_get_dirty. Snapshotting allows + * querying the same page multiple times, which is especially useful for + * display updates where the scanlines often are not page aligned. * * The dirty bitmap region which gets copyed into the snapshot (and * cleared afterwards) can be larger than requested. The boundaries diff --git a/memory.c b/memory.c index 93258a6..9e75bb9 100644 --- a/memory.c +++ b/memory.c @@ -1971,14 +1971,6 @@ void memory_region_set_dirty(MemoryRegion *mr, hwadd= r addr, memory_region_get_dirty_log_mask(m= r)); } =20 -bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, - hwaddr size, unsigned client) -{ - assert(mr->ram_block); - return cpu_physical_memory_test_and_clear_dirty( - memory_region_get_ram_addr(mr) + addr, size, client); -} - DirtyBitmapSnapshot *memory_region_snapshot_and_clear_dirty(MemoryRegion *= mr, hwaddr addr, hwaddr size, --=20 1.8.3.1