clear pending status before calling memory commit
clear pending status before calling memory commit. Otherwise when memory_region_finalize is called, memory_region_transaction_depth is 0 and memory_region_update_pending is true. That's wrong. Signed-off -by: Anthony Xu <anthony.xu@intel.com> Message-Id: <4712D8F4B26E034E80552F30A67BE0B1A2E3D5@ORSMSX112.amr.corp.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0832970119
commit
ade9c1aac5
10
memory.c
10
memory.c
|
@ -906,12 +906,6 @@ void memory_region_transaction_begin(void)
|
||||||
++memory_region_transaction_depth;
|
++memory_region_transaction_depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void memory_region_clear_pending(void)
|
|
||||||
{
|
|
||||||
memory_region_update_pending = false;
|
|
||||||
ioeventfd_update_pending = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void memory_region_transaction_commit(void)
|
void memory_region_transaction_commit(void)
|
||||||
{
|
{
|
||||||
AddressSpace *as;
|
AddressSpace *as;
|
||||||
|
@ -927,14 +921,14 @@ void memory_region_transaction_commit(void)
|
||||||
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
|
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
|
||||||
address_space_update_topology(as);
|
address_space_update_topology(as);
|
||||||
}
|
}
|
||||||
|
memory_region_update_pending = false;
|
||||||
MEMORY_LISTENER_CALL_GLOBAL(commit, Forward);
|
MEMORY_LISTENER_CALL_GLOBAL(commit, Forward);
|
||||||
} else if (ioeventfd_update_pending) {
|
} else if (ioeventfd_update_pending) {
|
||||||
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
|
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
|
||||||
address_space_update_ioeventfds(as);
|
address_space_update_ioeventfds(as);
|
||||||
}
|
}
|
||||||
|
ioeventfd_update_pending = false;
|
||||||
}
|
}
|
||||||
memory_region_clear_pending();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue