diff options
| author | Chenyi Qiang <chenyi.qiang@intel.com> | 2025-06-12 16:27:44 +0800 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-06-23 16:03:59 -0400 |
| commit | 2205b8466733f8c6e3306c964f31c5a7cac69dfa (patch) | |
| tree | 7a1b35a8bdcbcb763af65476bc0539de2d8aa670 /migration/ram.c | |
| parent | ff1211154c45c9f7f82116ae9a8c72a848e4a8b5 (diff) | |
| download | focaccia-qemu-2205b8466733f8c6e3306c964f31c5a7cac69dfa.tar.gz focaccia-qemu-2205b8466733f8c6e3306c964f31c5a7cac69dfa.zip | |
memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()
Update ReplayRamDiscard() function to return the result and unify the ReplayRamPopulate() and ReplayRamDiscard() to ReplayRamDiscardState() at the same time due to their identical definitions. This unification simplifies related structures, such as VirtIOMEMReplayData, which makes it cleaner. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com> Link: https://lore.kernel.org/r/20250612082747.51539-4-chenyi.qiang@intel.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/ram.c')
| -rw-r--r-- | migration/ram.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c index 024d8b3d03..2140785a05 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -856,8 +856,8 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs, return ret; } -static void dirty_bitmap_clear_section(MemoryRegionSection *section, - void *opaque) +static int dirty_bitmap_clear_section(MemoryRegionSection *section, + void *opaque) { const hwaddr offset = section->offset_within_region; const hwaddr size = int128_get64(section->size); @@ -876,6 +876,7 @@ static void dirty_bitmap_clear_section(MemoryRegionSection *section, } *cleared_bits += bitmap_count_one_with_offset(rb->bmap, start, npages); bitmap_clear(rb->bmap, start, npages); + return 0; } /* |