From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Xu, Anthony" <anthony.xu@intel.com>
Subject: [Qemu-devel] [PULL 1/9] clear pending status before calling memory commit
Date: Mon, 27 Mar 2017 18:16:07 +0200 [thread overview]
Message-ID: <20170327161615.19637-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20170327161615.19637-1-pbonzini@redhat.com>
From: "Xu, Anthony" <anthony.xu@intel.com>
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>
---
memory.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/memory.c b/memory.c
index 64b0a60..4c95aaf 100644
--- a/memory.c
+++ b/memory.c
@@ -906,12 +906,6 @@ void memory_region_transaction_begin(void)
++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)
{
AddressSpace *as;
@@ -927,14 +921,14 @@ void memory_region_transaction_commit(void)
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
address_space_update_topology(as);
}
-
+ memory_region_update_pending = false;
MEMORY_LISTENER_CALL_GLOBAL(commit, Forward);
} else if (ioeventfd_update_pending) {
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
address_space_update_ioeventfds(as);
}
+ ioeventfd_update_pending = false;
}
- memory_region_clear_pending();
}
}
--
2.9.3
next prev parent reply other threads:[~2017-03-27 16:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 16:16 [Qemu-devel] [PULL 0/9] Misc fixes for QEMU 2.9.0-rc2 Paolo Bonzini
2017-03-27 16:16 ` Paolo Bonzini [this message]
2017-03-27 16:16 ` [Qemu-devel] [PULL 2/9] virtio-scsi: Make virtio_scsi_acquire/release public Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 3/9] virtio-scsi: Fix acquire/release in dataplane handlers Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 4/9] tcg/i386: Check the size of instruction being translated Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 5/9] mem-prealloc: fix sysconf(_SC_NPROCESSORS_ONLN) failure case Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 6/9] win32: replace custom mutex and condition variable with native primitives Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 7/9] nbd: drop unused NBDClientSession.is_unix field Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 8/9] Revert "apic: save apic_delivered flag" Paolo Bonzini
2017-03-27 16:16 ` [Qemu-devel] [PULL 9/9] scsi-generic: Fill in opt_xfer_len in INQUIRY reply if it is zero Paolo Bonzini
2017-03-28 8:48 ` [Qemu-devel] [PULL 0/9] Misc fixes for QEMU 2.9.0-rc2 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170327161615.19637-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony.xu@intel.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).