diff options
| author | Nicholas Piggin <npiggin@gmail.com> | 2024-03-12 21:14:57 +0100 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2024-03-12 17:39:40 -0400 |
| commit | 86a9ae80cc5fa2a989f253fca5e70f61eb4269e2 (patch) | |
| tree | a92c8291bb2ba3bfbd6ba4cb8080ec76f9682013 /include/exec/ram_addr.h | |
| parent | 7e8ccf99ed5d0c546268cf584d4dca1569c97fea (diff) | |
| download | focaccia-qemu-86a9ae80cc5fa2a989f253fca5e70f61eb4269e2.tar.gz focaccia-qemu-86a9ae80cc5fa2a989f253fca5e70f61eb4269e2.zip | |
physmem: Factor cpu_physical_memory_dirty_bits_cleared() out
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240219061731.232570-1-npiggin@gmail.com> [PMD: Split patch in 2: part 1/2] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Link: https://lore.kernel.org/r/20240312201458.79532-3-philmd@linaro.org Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'include/exec/ram_addr.h')
| -rw-r--r-- | include/exec/ram_addr.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 90676093f5..b060ea9176 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -25,6 +25,7 @@ #include "sysemu/tcg.h" #include "exec/ramlist.h" #include "exec/ramblock.h" +#include "exec/exec-all.h" extern uint64_t total_dirty_pages; @@ -443,6 +444,14 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, } #endif /* not _WIN32 */ +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); + } + +} bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start, ram_addr_t length, unsigned client); |