From: Alex Williamson <alex.williamson@redhat.com>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: mtosatti@redhat.com, avi@redhat.com
Subject: [Qemu-devel] [PATCH] kvm: Don't walk memory_size == 0 slots in kvm_client_migration_log
Date: Wed, 14 Jul 2010 13:36:49 -0600 [thread overview]
Message-ID: <20100714193606.7124.80638.stgit@localhost6.localdomain6> (raw)
If we've unregistered a memory area, we should avoid calling
qemu_get_ram_ptr() on the left over phys_offset cruft in the
slot array. Now that we support removing ramblocks, the
phys_offset ram_addr_t can go away and cause a lookup fault
and abort.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
kvm-all.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index fec6d05..2922292 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -282,6 +282,9 @@ static int kvm_set_migration_log(int enable)
for (i = 0; i < ARRAY_SIZE(s->slots); i++) {
mem = &s->slots[i];
+ if (!mem->memory_size) {
+ continue;
+ }
if (!!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES) == enable) {
continue;
}
next reply other threads:[~2010-07-14 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 19:36 Alex Williamson [this message]
2010-07-16 1:12 ` [Qemu-devel] Re: [PATCH] kvm: Don't walk memory_size == 0 slots in kvm_client_migration_log Marcelo Tosatti
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=20100714193606.7124.80638.stgit@localhost6.localdomain6 \
--to=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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).