All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	"David Hildenbrand" <david@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Anton Johansson" <anjo@rev.ng>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Peter Xu" <peterx@redhat.com>
Subject: [PATCH 11/24] exec: Move tlb_reset_dirty*() declarations to 'exec/cputlb.h'
Date: Thu, 18 Apr 2024 21:25:10 +0200	[thread overview]
Message-ID: <20240418192525.97451-12-philmd@linaro.org> (raw)
In-Reply-To: <20240418192525.97451-1-philmd@linaro.org>

Declare tlb_reset_dirty() and tlb_reset_dirty_range_all()
in "exec/cputlb.h". Restrict tlb_reset_dirty_range_all()
to TCG accel.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/exec/cputlb.h   | 12 +++++++++++-
 include/exec/exec-all.h |  3 ---
 include/exec/ram_addr.h |  1 +
 system/physmem.c        |  2 ++
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
index 3594f904b4..dc92befb93 100644
--- a/include/exec/cputlb.h
+++ b/include/exec/cputlb.h
@@ -49,6 +49,9 @@ void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
 void tlb_protect_code(ram_addr_t ram_addr);
 void tlb_unprotect_code(ram_addr_t ram_addr);
 
+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);
+
 /**
  * iotlb_to_section:
  * @cpu: CPU performing the access
@@ -69,6 +72,13 @@ hwaddr memory_region_section_get_iotlb(CPUState *cpu,
 
 #endif /* CONFIG_USER_ONLY */
 
-#endif /* CONFIG_TCG */
+#else /* !CONFIG_TCG */
+
+static inline void tlb_reset_dirty_range_all(ram_addr_t start,
+                                             ram_addr_t length)
+{
+}
+
+#endif /* !CONFIG_TCG */
 
 #endif
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 778c82ba8e..6f46015ab4 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -640,9 +640,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);
-
 #endif
 
 #endif
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 3fc83587c0..f06ae9b516 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -26,6 +26,7 @@
 #include "exec/ramlist.h"
 #include "exec/ramblock.h"
 #include "exec/exec-all.h"
+#include "cputlb.h"
 #include "qemu/rcu.h"
 
 extern uint64_t total_dirty_pages;
diff --git a/system/physmem.c b/system/physmem.c
index 38d3ede9f9..7a7876a375 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -850,6 +850,7 @@ found:
     return block;
 }
 
+#ifdef CONFIG_TCG
 void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length)
 {
     CPUState *cpu;
@@ -869,6 +870,7 @@ void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length)
         tlb_reset_dirty(cpu, start1, length);
     }
 }
+#endif
 
 /* Note: start and end must be within the same ram block.  */
 bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start,
-- 
2.41.0



  parent reply	other threads:[~2024-04-18 19:28 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 19:24 [PATCH 00/24] include/exec: Rework (part 2) Philippe Mathieu-Daudé
2024-04-18 19:25 ` [PATCH 01/24] exec: Declare MMUAccessType type in 'mmu-access-type.h' header Philippe Mathieu-Daudé
2024-04-21  5:13   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 02/24] exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header Philippe Mathieu-Daudé
2024-04-18 19:29   ` Philippe Mathieu-Daudé
2024-04-25  6:29     ` Anton Johansson via
2024-04-25  6:29       ` Anton Johansson via
2024-04-21  5:19   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 03/24] hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h' Philippe Mathieu-Daudé
2024-04-21  5:20   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 04/24] exec: Restrict TCG specific declarations of 'cputlb.h' Philippe Mathieu-Daudé
2024-04-21  5:28   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 05/24] exec: Restrict 'cpu_ldst.h' to TCG accelerator Philippe Mathieu-Daudé
2024-04-21 16:27   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments Philippe Mathieu-Daudé
2024-04-21 16:29   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 07/24] exec: Un-inline tlb_vaddr_to_host() and declare it in 'exec/cputlb.h' Philippe Mathieu-Daudé
2024-04-21 16:33   ` Richard Henderson
2024-04-25  6:43   ` Anton Johansson via
2024-04-25  6:43     ` Anton Johansson via
2024-04-25  7:52     ` Anton Johansson via
2024-04-25  7:52       ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 08/24] physmem: Move TCG CPU IOTLB methods around Philippe Mathieu-Daudé
2024-04-21 16:34   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 09/24] physmem: Restrict TCG CPU IOTLB code to TCG accel Philippe Mathieu-Daudé
2024-04-25  7:30   ` Anton Johansson via
2024-04-25  7:30     ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope Philippe Mathieu-Daudé
2024-04-21 16:36   ` Richard Henderson
2024-04-18 19:25 ` Philippe Mathieu-Daudé [this message]
2024-04-25  7:25   ` [PATCH 11/24] exec: Move tlb_reset_dirty*() declarations to 'exec/cputlb.h' Anton Johansson via
2024-04-25  7:25     ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 12/24] exec: Move CPUTLBEntry helpers to cputlb.c Philippe Mathieu-Daudé
2024-04-21 16:39   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 13/24] target/sparc: Replace abi_ulong by uint32_t for TARGET_ABI32 Philippe Mathieu-Daudé
2024-04-21 16:39   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 14/24] exec: Rename 'exec/user/guest-base.h' as 'user/guest-base.h' Philippe Mathieu-Daudé
2024-04-25  7:39   ` Anton Johansson via
2024-04-25  7:39     ` Anton Johansson via
2024-04-25  8:30     ` Philippe Mathieu-Daudé
2024-04-18 19:25 ` [PATCH 15/24] exec: Restrict inclusion of 'user/guest-base.h' Philippe Mathieu-Daudé
2024-04-25  7:42   ` Anton Johansson via
2024-04-25  7:42     ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 16/24] exec: Move GUEST_ADDR_MAX definition to 'cpu_ldst.h' Philippe Mathieu-Daudé
2024-04-25  7:44   ` Anton Johansson via
2024-04-25  7:44     ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 17/24] exec: Include missing 'qemu/log-for-trace.h' header in 'exec/log.h' Philippe Mathieu-Daudé
2024-04-21 16:44   ` Richard Henderson
2024-04-22  9:05     ` Philippe Mathieu-Daudé
2024-04-22 11:44       ` Philippe Mathieu-Daudé
2024-04-18 19:25 ` [PATCH 18/24] plugins: Include missing 'qemu/bitmap.h' header Philippe Mathieu-Daudé
2024-04-21 16:45   ` Richard Henderson
2024-04-26 19:34   ` Pierrick Bouvier
2024-04-18 19:25 ` [PATCH 19/24] gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h' Philippe Mathieu-Daudé
2024-04-21 16:49   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 20/24] hw/xtensa: Include missing 'exec/cpu-common.h' in 'bootparam.h' Philippe Mathieu-Daudé
2024-04-25  7:46   ` Anton Johansson via
2024-04-25  7:46     ` Anton Johansson via
2024-04-18 19:25 ` [PATCH 21/24] plugins: Un-inline qemu_plugin_disable_mem_helpers() Philippe Mathieu-Daudé
2024-04-21 16:52   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 22/24] exec: Remove 'exec/tswap.h' from 'exec/cpu-all.h' Philippe Mathieu-Daudé
2024-04-19  4:25   ` Harsh Prateek Bora
2024-04-18 19:25 ` [PATCH 23/24] exec: Remove 'disas/disas.h' from 'exec/log.h' Philippe Mathieu-Daudé
2024-04-21 17:00   ` Richard Henderson
2024-04-18 19:25 ` [PATCH 24/24] exec: Remove unnecessary inclusions of 'hw/core/cpu.h' Philippe Mathieu-Daudé
2024-04-21 17:02   ` Richard Henderson
2024-04-18 19:35 ` [PATCH 00/24] include/exec: Rework (part 2) Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240418192525.97451-12-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=anjo@rev.ng \
    --cc=david@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.