Skip to content
  • Michael S. Tsirkin's avatar
    arch_init: align MR size to target page size · 0851c9f7
    Michael S. Tsirkin authored
    
    
    Migration code assumes that each MR is a multiple of TARGET_PAGE_SIZE:
    MR size is divided by TARGET_PAGE_SIZE, so if it isn't migration
    never completes.
    But this isn't really required for regions set up with
    memory_region_init_ram, since that calls qemu_ram_alloc
    which aligns size up using TARGET_PAGE_ALIGN.
    
    Align MR size up to full target page sizes, this way
    migration completes even if we create a RAM MR
    which is not a full target page size.
    
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
    0851c9f7