mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-15 08:01:35 +00:00
When we import a page, we have a page with some data or empty, empty does not mean there is no data, it rather means it's full of zeros. We can skip writing the data as guest memory of the page is already zeroed. A page could be partially filled and the rest of the content is zero. Our IGVM generation tool only fills data here if there is some data without zeros. Rest of them are padded. We only write data without padding and compare whether we complete writing the buffer content. Still it's a full page and update the variable with length of the full page. Signed-off-by: Muminul Islam <muislam@microsoft.com>