qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 13/24] exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h'


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 13/24] exec: Declare tlb_reset_dirty*() in 'exec/cputlb.h'
Date: Thu, 14 Nov 2024 22:05:33 +0100
User-agent: Mozilla Thunderbird

On 14/11/24 19:19, Richard Henderson wrote:
On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
Move CPU TLB related methods to "exec/cputlb.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  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

This can join the existing CONFIG_TCG, !CONFIG_USER_ONLY block above.

Actually they are used by all accelerators (thus prototype required),
but elided at build time:

static inline
void cpu_physical_memory_dirty_bits_cleared(ram_addr_t start,
                                            ram_addr_t length)
{
    if (tcg_enabled()) {
        tlb_reset_dirty_range_all(start, length);
    }

}

That said, we can probably to smth to improve that. I'll have
a look.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]