summaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-06 11:57:21 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:49 +0200
commit856d72454f03aea26fd61c728762ef9cd1d71512 (patch)
tree3b53d53b76eb3f819ded7a9ae493795398ac85c1 /qom
parenta9a0c06dd750cca982f21089099207874b960656 (diff)
downloadqemu-856d72454f03aea26fd61c728762ef9cd1d71512.tar.gz
memory: add reference counting to FlatView
With this change, a FlatView can be used even after a concurrent update has replaced it. Because we do not yet have RCU, we use a mutex to protect the small critical sections that read/write the as->current_map pointer. Accesses to the FlatView can be done outside the mutex. If a MemoryRegion will be used after the FlatView is unref-ed (or after a MemoryListener callback is returned), a reference has to be added to that MemoryRegion. memory_region_find already does it for the region that it returns. The same will be done for address_space_translate as soon as the dispatch tree is also converted to RCU-style. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qom')
0 files changed, 0 insertions, 0 deletions