From patchwork Sun Mar 17 20:57:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 780871 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1150143wrs; Sun, 17 Mar 2024 13:59:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUmlLILNQj3j3qlfGhKhhqe8P4/UUiXmRQ6Bsqx3DWqGKxLAfJwTlrf6NQ8JSU3Vtd054vto34oRFot0cr3V1WW X-Google-Smtp-Source: AGHT+IEudR5AXrPnJvseuMaWAQd4RNFXpLdBoItecyIFz63zCmYfTUmweyZnRF/XyqtycxSoD4zX X-Received: by 2002:a05:622a:18a6:b0:430:d300:7194 with SMTP id v38-20020a05622a18a600b00430d3007194mr1373403qtc.42.1710709170710; Sun, 17 Mar 2024 13:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710709170; cv=none; d=google.com; s=arc-20160816; b=W2YQ+hCO71cnQ8aHmKcJgLeaD/EdaRbh/QmaZ07tt/JIRvyy1bIZQkKsUxb38wQBfk ZwAhD/bwVba6nF4ZNLZRODGshByitCWItCDpPTGRJKCCJmfw8DQB7y5SjztyYancwb2t 0TWY0n76YajiLeMFSp90XvJZAM92gDF8O/mq+6L3LRLDd7yvBE7BTSucYxWyqLYSm+qY E86wFXZgRXTQOaLF/zJcI6WnTWIbI7On2VaUNJpd+iu+M9uEPU0JPNm4DtFk0U3y7/Al 8nibmTLUUyrXukYXBhs53unRU4oTCC8VcR//Z9iK7Ketiqh6Czydp7tXX4b2ZzcEdJFj f4Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XYUowG+n3GNsgXqb2DaoNPh3LIqkGmyhv13NH0L54Fw=; fh=ic5U7Bqvr7tF9ur+HWtoSIsHB9g/idOo9oooC/cKxew=; b=iIwbno5oTRZ2QbN9LTpyf1ptGLNBEDU4Q+ivf8n4fK7kMIwKk34oRw5PHkn1+miJz6 ak5rpQcKDr5MO/8DHJt5R71zKSZNIS+zIx/w3pOWzuxKpdc7EkMEefsfudgx+ifyGe5R n0ecfdbpC8Q5gW8fpXdDNkgJ3unapv2P74yevb25kQDeAJRRZDmpDqKPvStHwwQPGzpI z41o4VxlBMcKXbYuLtW4RkvzZrkABCMP62qlTa0j5FBAYZ/i+7/P0YyQ2ss6RbE7fTqX TtocibvLZidlVy5JnTpmkszjs3+qK1jKKQzsmbC+3WiZBmiDgl5H8KnKs7DmgP3W/SrM oCjQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MeVV0+E4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bp13-20020a05622a1b8d00b00430978eb3bdsi8052617qtb.570.2024.03.17.13.59.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Mar 2024 13:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MeVV0+E4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlxaE-0002D3-Ux; Sun, 17 Mar 2024 16:58:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlxaD-0002C3-4a for qemu-devel@nongnu.org; Sun, 17 Mar 2024 16:58:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlxaB-0002a1-G7 for qemu-devel@nongnu.org; Sun, 17 Mar 2024 16:58:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710709094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XYUowG+n3GNsgXqb2DaoNPh3LIqkGmyhv13NH0L54Fw=; b=MeVV0+E4GmKZtzbuSkqAWyaScAkaBJGGeJRKFaopTblM+3qwW7NExS1YAqWuBV9I8IKqqM QohaZ1Rufwr0LN1qM5+vD2bzkLHM3VD2n8TtE95nBZ/BzLrnNfHnZ3xPBDIj/s3cY921cz oNCuj3itES+WizW5su6bCZ9X7DLvrq0= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549-VIVV1DZ1NwS9VYbWReMSyg-1; Sun, 17 Mar 2024 16:58:12 -0400 X-MC-Unique: VIVV1DZ1NwS9VYbWReMSyg-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-42f30752eb4so12381271cf.1 for ; Sun, 17 Mar 2024 13:58:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710709092; x=1711313892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XYUowG+n3GNsgXqb2DaoNPh3LIqkGmyhv13NH0L54Fw=; b=NygyC4QlYAvFDARBi/Vz2rsJ6ubVMcYK5MR267ro83kWHX2upCERF1S61rqGj3jwEf tjpkeRqi+ZzIuEsuPO8qHBfTE4Eg/OAbnHf3kmXHeTm1kcAYwSCAqhUmE/H4Yuw4N75R /RUrkLgWpRK9Y3hdOmyu+4u2Pa/SdFGL/ZBAPIQDuDjGONojprkJ6CAEHIGsAS/CgKTp 7CHSo+Wl5UtlNZOnxkZPeVWWy/BFtoi5l/8oGM3JLs9YbTzFxDMFRtog6ZUPEUgHNUBn zzB4FpYtVYeP6gaBlIJhu6TmCAH7tMcMOeViSLF4JnwjTmddxNReYxzFrgXtDt5E/q4F Wcjw== X-Gm-Message-State: AOJu0YwykcfxljpqLR0gYke9OZyVwCP53tBQFkMvlnAgr2NtaohrUT3f a+tBU3cF0oM8YuRiPg85xI5harIwyoFz6Vs21l2mHLPKtxkmU/GHa4ZlPHJdxfvEUIEIAH0QPkc eAVepXTO3WHdRazAexeMSYaegrwFUmHuBRRTsjT8yZ3QUwTF2Emb5g/ZSVxHI5hD3PhGtPta73x BPUApeKEKHZZk4C/plpgKQmh/Nm7s/OyOFtA== X-Received: by 2002:a05:6214:3d9a:b0:691:456f:415a with SMTP id om26-20020a0562143d9a00b00691456f415amr12266596qvb.4.1710709091702; Sun, 17 Mar 2024 13:58:11 -0700 (PDT) X-Received: by 2002:a05:6214:3d9a:b0:691:456f:415a with SMTP id om26-20020a0562143d9a00b00691456f415amr12266577qvb.4.1710709091248; Sun, 17 Mar 2024 13:58:11 -0700 (PDT) Received: from x1n.. ([99.254.121.117]) by smtp.gmail.com with ESMTPSA id ed8-20020ad44ea8000000b00691879d7a50sm2391566qvb.115.2024.03.17.13.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 13:58:10 -0700 (PDT) From: peterx@redhat.com To: qemu-devel@nongnu.org, Peter Maydell Cc: Fabiano Rosas , Prasad Pandit , peterx@redhat.com, David Hildenbrand , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 03/10] physmem: Expose tlb_reset_dirty_range_all() Date: Sun, 17 Mar 2024 16:57:56 -0400 Message-ID: <20240317205803.361163-4-peterx@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240317205803.361163-1-peterx@redhat.com> References: <20240317205803.361163-1-peterx@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.316, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé In order to call tlb_reset_dirty_range_all() outside of system/physmem.c, expose its prototype. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Link: https://lore.kernel.org/r/20240312201458.79532-2-philmd@linaro.org Signed-off-by: Peter Xu --- include/exec/exec-all.h | 1 + system/physmem.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index ce36bb10d4..3e53501691 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -655,6 +655,7 @@ static inline void mmap_unlock(void) {} void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); void tlb_set_dirty(CPUState *cpu, vaddr addr); +void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length); MemoryRegionSection * address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, diff --git a/system/physmem.c b/system/physmem.c index 6cfb7a80ab..5441480ff0 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -819,7 +819,7 @@ found: return block; } -static void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length) +void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length) { CPUState *cpu; ram_addr_t start1;