From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Alex Williamson <alex.williamson@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
peterx@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/4] arm: postpone device listener unregister
Date: Mon, 22 Jan 2018 14:02:42 +0800 [thread overview]
Message-ID: <20180122060244.29368-3-peterx@redhat.com> (raw)
In-Reply-To: <20180122060244.29368-1-peterx@redhat.com>
It's a preparation for follow-up patch to call region_del() in
memory_listener_unregister(), otherwise all device addr attached with
kvm_devices_head will be reset before calling kvm_arm_set_device_addr.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
target/arm/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 211a7bf7be..1219d0062b 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -266,7 +266,6 @@ static void kvm_arm_machine_init_done(Notifier *notifier, void *data)
{
KVMDevice *kd, *tkd;
- memory_listener_unregister(&devlistener);
QSLIST_FOREACH_SAFE(kd, &kvm_devices_head, entries, tkd) {
if (kd->kda.addr != -1) {
kvm_arm_set_device_addr(kd);
@@ -274,6 +273,7 @@ static void kvm_arm_machine_init_done(Notifier *notifier, void *data)
memory_region_unref(kd->mr);
g_free(kd);
}
+ memory_listener_unregister(&devlistener);
}
static Notifier notify = {
--
2.14.3
next prev parent reply other threads:[~2018-01-22 6:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 6:02 [Qemu-devel] [PATCH v2 0/4] memory/vfio: notify region_del() when unregister listeners Peter Xu
2018-01-22 6:02 ` [Qemu-devel] [PATCH v2 1/4] vhost: add traces for memory listeners Peter Xu
2018-01-26 16:44 ` Michael S. Tsirkin
2018-01-22 6:02 ` Peter Xu [this message]
2018-01-22 6:02 ` [Qemu-devel] [PATCH v2 3/4] vfio: listener unregister before unset container Peter Xu
2018-01-26 16:46 ` Alex Williamson
2018-01-22 6:02 ` [Qemu-devel] [PATCH v2 4/4] memory: do explicit cleanup when remove listeners Peter Xu
2018-01-26 9:17 ` [Qemu-devel] [PATCH v2 0/4] memory/vfio: notify region_del() when unregister listeners Paolo Bonzini
2018-01-30 19:12 ` Paolo Bonzini
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=20180122060244.29368-3-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).