On Thursday, April 10, 2025 21:52 CEST, Fabiano Rosas <faro...@suse.de> wrote:
> We'll need to add the infrastructure to reject multifd and direct-io > before this. The rest of the capabilities should not affect mapped-ram, > so it's fine (for now) if we don't honor them. Ok, thanks for the update. > What about zero page handling? Mapped-ram doesn't send zero pages > because the file will always have zeroes in it and the migration > destination is guaranteed to not have been running previously. I believe > loading a snapshot in a VM that's already been running would leave stale > data in the guest's memory. Yes, you are correct. About the `RAMBlock->file_bmap`, according to the code it is a: `/* bitmap of pages present in the migration file */` And, if a pages is a zero page, it won't be in the migration file: `/* zero pages are not transferred with mapped-ram */` So, zero page implies bitmap 0. Does the opposite hold? If bitmap 0 implies zero page, we could call `ram_handle_zero` in `read_ramblock_mapped_ram` for the clear bits. Or do you fear this might be unnecessary expensive for migration? If bitmap 0 does not imply zero page, I feel like the "is present in the migration file" and "is zero page" info should be better separated. Best, Marco