Skip to content
  • Paolo Bonzini's avatar
    2e2b8eb7
    memory: allow destroying a non-empty MemoryRegion · 2e2b8eb7
    Paolo Bonzini authored
    
    
    This is legal; the MemoryRegion will simply unreference all the
    existing subregions and possibly bring them down with it as well.
    However, it requires a bit of care to avoid an infinite loop.
    Finalizing a memory region cannot trigger an address space update,
    but memory_region_del_subregion errs on the side of caution and
    might trigger a spurious update: avoid that by resetting mr->enabled
    first.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <1443689999-12182-2-git-send-email-armbru@redhat.com>
    2e2b8eb7
    memory: allow destroying a non-empty MemoryRegion
    Paolo Bonzini authored
    
    
    This is legal; the MemoryRegion will simply unreference all the
    existing subregions and possibly bring them down with it as well.
    However, it requires a bit of care to avoid an infinite loop.
    Finalizing a memory region cannot trigger an address space update,
    but memory_region_del_subregion errs on the side of caution and
    might trigger a spurious update: avoid that by resetting mr->enabled
    first.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <1443689999-12182-2-git-send-email-armbru@redhat.com>
Loading