Skip to content
  • David Hildenbrand's avatar
    3b95a71b
    virtio-mem: Migrate immutable properties early · 3b95a71b
    David Hildenbrand authored
    
    
    The bitmap and the size are immutable while migration is active: see
    virtio_mem_is_busy(). We can migrate this information early, before
    migrating any actual RAM content. Further, all information we need for
    sanity checks is immutable as well.
    
    Having this information in place early will, for example, allow for
    properly preallocating memory before touching these memory locations
    during RAM migration: this way, we can make sure that all memory was
    actually preallocated and that any user errors (e.g., insufficient
    hugetlb pages) can be handled gracefully.
    
    In contrast, usable_region_size and requested_size can theoretically
    still be modified on the source while the VM is running. Keep migrating
    these properties the usual, late, way.
    
    Use a new device property to keep behavior of compat machines
    unmodified.
    
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com&gt;S>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
    3b95a71b
    virtio-mem: Migrate immutable properties early
    David Hildenbrand authored
    
    
    The bitmap and the size are immutable while migration is active: see
    virtio_mem_is_busy(). We can migrate this information early, before
    migrating any actual RAM content. Further, all information we need for
    sanity checks is immutable as well.
    
    Having this information in place early will, for example, allow for
    properly preallocating memory before touching these memory locations
    during RAM migration: this way, we can make sure that all memory was
    actually preallocated and that any user errors (e.g., insufficient
    hugetlb pages) can be handled gracefully.
    
    In contrast, usable_region_size and requested_size can theoretically
    still be modified on the source while the VM is running. Keep migrating
    these properties the usual, late, way.
    
    Use a new device property to keep behavior of compat machines
    unmodified.
    
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Reviewed-by: default avatarJuan Quintela <quintela@redhat.com&gt;S>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
Loading