aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-10-22 14:49:18 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-10-22 14:49:18 -0500
commit50d2b4d93f45a425f15ac88bc4ec352f5c6e0bc2 (patch)
treeece259d4128ecc03957514401a32a5a8d422d9a6 /memory.c
parent248bbe74930472e7653dd88716188ab0329f4604 (diff)
parent2be0e25f4b6a4f91e39388cc365bbe53b56ab62a (diff)
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
* qemu-kvm/memory/urgent: memory: abort if a memory region is destroyed during a transaction i440fx: avoid destroying memory regions within a transaction memory: Make eventfd adhere to device endianness
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 2f68d67c21..714ec43ec0 100644
--- a/memory.c
+++ b/memory.c
@@ -1019,6 +1019,7 @@ void memory_region_init_reservation(MemoryRegion *mr,
void memory_region_destroy(MemoryRegion *mr)
{
assert(QTAILQ_EMPTY(&mr->subregions));
+ assert(memory_region_transaction_depth == 0);
mr->destructor(mr);
memory_region_clear_coalescing(mr);
g_free((char *)mr->name);
@@ -1234,6 +1235,7 @@ void memory_region_add_eventfd(MemoryRegion *mr,
};
unsigned i;
+ adjust_endianness(mr, &mrfd.data, size);
memory_region_transaction_begin();
for (i = 0; i < mr->ioeventfd_nb; ++i) {
if (memory_region_ioeventfd_before(mrfd, mr->ioeventfds[i])) {
@@ -1265,6 +1267,7 @@ void memory_region_del_eventfd(MemoryRegion *mr,
};
unsigned i;
+ adjust_endianness(mr, &mrfd.data, size);
memory_region_transaction_begin();
for (i = 0; i < mr->ioeventfd_nb; ++i) {
if (memory_region_ioeventfd_equal(mrfd, mr->ioeventfds[i])) {