vm-migration: better naming + unittests

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-11-12 11:18:35 +01:00
committed by Rob Bradford
parent b6c266c880
commit a7fa3a0c86
4 changed files with 56 additions and 18 deletions

View File

@@ -393,7 +393,7 @@ impl BlocksState {
// TODO We can avoid creating a new bitmap here, if we switch the code
// to use Vec<u64> to keep dirty bits and just pass it as is.
MemoryRangeTable::from_bitmap(bitmap, start_addr, VIRTIO_MEM_DEFAULT_BLOCK_SIZE)
MemoryRangeTable::from_dirty_bitmap(bitmap, start_addr, VIRTIO_MEM_DEFAULT_BLOCK_SIZE)
}
}

View File

@@ -575,7 +575,7 @@ impl VhostUserHandle {
let ptr = region.as_ptr() as *const u64;
std::slice::from_raw_parts(ptr, len)
};
Ok(MemoryRangeTable::from_bitmap(
Ok(MemoryRangeTable::from_dirty_bitmap(
bitmap.iter().copied(),
0,
4096,