From patchwork Thu Nov 14 01:12:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 843098 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcc:0:b0:382:184f:390f with SMTP id e12csp48616wrc; Wed, 13 Nov 2024 17:15:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV4JKdE5fspIyFgS/FauK/vAlUm8TWFMvR6tLOijklNii9MrlyurDSoobrhIcs1RcdysvUCNw==@linaro.org X-Google-Smtp-Source: AGHT+IES9s0+MdNOh6Vy5D5QPfkud6XMQ/mHYJ+UV8MmHWGpUusJtam+e/2Qc1SD9XR9gpiPhvQJ X-Received: by 2002:a05:622a:40e:b0:460:913d:cf25 with SMTP id d75a77b69052e-46358ff2e7dmr6014031cf.50.1731546928289; Wed, 13 Nov 2024 17:15:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731546928; cv=none; d=google.com; s=arc-20240605; b=f6sax+/FN92unhXAuuEhe5FsC4sykeQFyHiPzeb6Lzq3SH/UEpiX3prASYq4zUmwcU q0917u303+LvZfbARSS7hS9ntxt3ptKEJeaITnq6pEy9wjHy8D8pCyR7VMcoLlCf0WEK OKljNBDjNV0/+O1ySvZbQGHuaPEDId9LAaF07OdDk5PeckdpENbzLgaUynF6/JySUUou 1VtD1JTrWnxOdBzHEmUTWrVzFyVVOJ0qbwyKQwIkwckRolgwhN/NZxVERHHSRjdcTIAR zfvtJ4oEtOCJtx+z/Zsiflw9wCawuP67OD5x7vMbF5ZkIGIwLMu/btPl297f/M1YPm3x Hy/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=2hAfsLa5F/wTHTnThKWfes1iOEyMXfbHgC1xYE0xNjQ=; fh=wGf8DWnFEKKg5v8ezHd8fXSvuoY7NGwU3r0JlLXKqkA=; b=enKJanUM+Qdypg8ViKEi74BiG8jCtDgvj8c0oz244+/lXoyj9vD5zk7u4c30eHP4sx sW1sqtdCPvxbB7yY0jQT8awLZQZKdq0qeC1pxBRWRk0SE5NdJjlL+xeFFdD1JGn3yvp7 Mx8B60VuLf1p1YOUMYgfvw6HErFp+yohgc5u3YvQSOr96gSxQiezY9JHvRR4QoWsB4FW uVJb5MCwTpgx04T7wTRCKRnk8JtSssbyglYv9jHMQ+fXKeDR9IROMjV9G32hUmIIWWgA guvxArb/T0Hsl5tm6aYhPljLU/2SlZD7AzAI1A53g2hFx/gRP31gUqFAhPS0/c5KsXmJ fC0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMVlTWVy; 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=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b35ca5f68asi1505285a.389.2024.11.13.17.15.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Nov 2024 17:15:28 -0800 (PST) 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=@linaro.org header.s=google header.b=iMVlTWVy; 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=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBOS9-00010b-J5; Wed, 13 Nov 2024 20:15:21 -0500 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 1tBOS5-0000ir-Er for qemu-devel@nongnu.org; Wed, 13 Nov 2024 20:15:17 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBOS3-0002Oi-Ic for qemu-devel@nongnu.org; Wed, 13 Nov 2024 20:15:17 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4316cce103dso1188905e9.3 for ; Wed, 13 Nov 2024 17:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731546902; x=1732151702; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2hAfsLa5F/wTHTnThKWfes1iOEyMXfbHgC1xYE0xNjQ=; b=iMVlTWVyKpfHAhvxo6HbvZo3XEa73a1aJlyby1RrKCRzdX1ycvtezXP7MJ1dtUgsan Zc1X9hMhIjJPTUvmvizoRq4A/gStjmkZH68ZoCknj1QpZOUqysBn4DPxQR/PNVFCv0PC Qhx/MZ0TgblILs7CyE6qaw2t3maTCO5cY4hUu5+9Sq9VuWFAY8792e6PgQqICwDJvV3J OaNDdjxmDxjfmCI9QQJrSZxOBXFP3VBqT3P6MvT2kc6RNFacaAIyPtYrWuPG7O2XJvcv kx97TfOm1cky46dsCWHgvbopsS8EH0xTun6tqwP5gi4MjXa4NJeDNDbdkVxT2tjopord 4Irw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731546902; x=1732151702; 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=2hAfsLa5F/wTHTnThKWfes1iOEyMXfbHgC1xYE0xNjQ=; b=m3FCBOVZiChiqexEOZZuh8JsIbSYgVuJx5NCnlJiDxr56+I9k1JLs70CcXVgnAoeyl vYRVUDb8ZEXx/4PLgo1Fn79UAgiM6iNuM6bx4qNYZy7WX/Ml6d7TB1raM0WtbFFWBCdn ozK4Ba/qPNl7UYJ8HkJMGzWMkeZS76Kf2vrTIng4G1+j8l7Q8NaQ/nrsQd1t0nW8rCRF r1jqGXpgAY94EJquRdvjvHH6pSyKp9DSKihQwDadxhiPV9aDHyyUAOpiozSHjrJmjRkr CPj41Lmyn0G1oF+LH7Z/zaID6huHh34XNeiecNla7l6HFm+tUFclclpWyCqg641XLbsN 6rtw== X-Forwarded-Encrypted: i=1; AJvYcCWAkshsJ1HK2mkO8iXP6lYqGaOC6sewgIsTY6z8wynqExD9M5uK8g0Ih4UpJf2eRtoze9TKOu4m6Kdn@nongnu.org X-Gm-Message-State: AOJu0YxBJdzvdBz4vV334fovrjnEqKOAH4fb3/3isilWy9zncspwZjXn HjqfDKyAlsv5YF8TxTRtFCMeE6gR2BjERPK9afN+RGLxgbJyrKXxlL0S9t5eeMM= X-Received: by 2002:a05:600c:444e:b0:431:52a3:d9d5 with SMTP id 5b1f17b1804b1-432da6d6676mr3323435e9.0.1731546902007; Wed, 13 Nov 2024 17:15:02 -0800 (PST) Received: from localhost.localdomain ([176.187.209.238]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432dac1fbf9sm1377125e9.41.2024.11.13.17.14.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 13 Nov 2024 17:15:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , Richard Henderson , Anton Johansson , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Thomas Huth , qemu-arm@nongnu.org, Peter Xu , Pierrick Bouvier , qemu-riscv@nongnu.org, David Hildenbrand , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 13/24] exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h' Date: Thu, 14 Nov 2024 02:12:58 +0100 Message-ID: <20241114011310.3615-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114011310.3615-1-philmd@linaro.org> References: <20241114011310.3615-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 Move CPU TLB related methods to "exec/cputlb.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- include/exec/cputlb.h | 7 +++++++ include/exec/exec-all.h | 3 --- include/exec/ram_addr.h | 1 + system/physmem.c | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h index ef18642a32..6cac7d530f 100644 --- a/include/exec/cputlb.h +++ b/include/exec/cputlb.h @@ -32,4 +32,11 @@ void tlb_unprotect_code(ram_addr_t ram_addr); #endif /* CONFIG_TCG */ +#ifndef CONFIG_USER_ONLY + +void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); +void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length); + +#endif + #endif diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 2e4c4cc4b4..2c06e54387 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -589,9 +589,6 @@ static inline void mmap_lock(void) {} static inline void mmap_unlock(void) {} #define WITH_MMAP_LOCK_GUARD() -void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); -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, hwaddr *xlat, hwaddr *plen, diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 891c44cf2d..b6d5551549 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -23,6 +23,7 @@ #include "cpu.h" #include "sysemu/xen.h" #include "sysemu/tcg.h" +#include "exec/cputlb.h" #include "exec/ramlist.h" #include "exec/ramblock.h" #include "exec/exec-all.h" diff --git a/system/physmem.c b/system/physmem.c index dc1db3a384..3f937a5e58 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -32,6 +32,7 @@ #endif /* CONFIG_TCG */ #include "exec/exec-all.h" +#include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" #include "hw/qdev-core.h"