[PATCH-for-9.0 v2 1/3] physmem: Expose tlb_reset_dirty_range_all()

Philippe Mathieu-Daudé posted 3 patches 8 months ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
[PATCH-for-9.0 v2 1/3] physmem: Expose tlb_reset_dirty_range_all()
Posted by Philippe Mathieu-Daudé 8 months ago
In order to call tlb_reset_dirty_range_all() outside of
system/physmem.c, expose its prototype.

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


Re: [PATCH-for-9.0 v2 1/3] physmem: Expose tlb_reset_dirty_range_all()
Posted by Nicholas Piggin 8 months ago
On Wed Mar 13, 2024 at 6:14 AM AEST, Philippe Mathieu-Daudé wrote:
> In order to call tlb_reset_dirty_range_all() outside of
> system/physmem.c, expose its prototype.
>

Acked-by: Nicholas Piggin <npiggin@gmail.com>

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