diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-06-13 08:46:54 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-09-07 16:10:43 +0200 |
commit | 732bdd383ee06be2655b1a849a628ff03b0000b8 (patch) | |
tree | 0326fc4a3804a1904b5f9f387e81c1d1733ae208 /include/hw/s390x/sclp.h | |
parent | 35925a7a73e7df4118cb11667095bd2d8fc4e091 (diff) |
s390/sclp: temporarily fix unassignment/reassignment of memory subregions
Commit 374f2981d1f1 ("memory: protect current_map by RCU") broke
unassignment of standby memory on s390x. Looks like that the new
parallelism allows races with our (semi broken) memory hotplug code. The
flatview_unref() can now be executed after our unparenting. Therefore
memory_region_unref() tries to unreference the MemoryRegion itself instead
of the parent.
In theory, MemoryRegions are now bound to separate devices that control
their lifetime. We don't have this yet, so we really want to control their
lifetime manually.
This patch fixes it temporarily, until we have a proper rework. The only
drawback is that they won't pop up in "info qom-tree", but that's better
than qemu crashes.
We have to release the reference to a memory region after a
memory_region_find, as it automatically takes a reference. As we're now
able to reassign memory, the MemoryRegion is in fact deleted (otherwise
vmstate_register_ram() would complain).
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'include/hw/s390x/sclp.h')
0 files changed, 0 insertions, 0 deletions