From: Tiejun Chen <tiejun.chen@intel.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH] kvm: update_memslots: clean flags for invalid memslots
Date: Fri, 9 Jan 2015 16:29:14 +0800 [thread overview]
Message-ID: <1420792154-32454-1-git-send-email-tiejun.chen@intel.com> (raw)
Indeed, any invalid memslots should be new->npages = 0,
new->base_gfn = 0 and new->flags = 0 at the same time.
Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
Paolo,
This is just a small cleanup to follow-up commit, efbeec7098ee, "fix
sorting of memslots with base_gfn == 0".
Tiejun
virt/kvm/kvm_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1cc6e2e..369c759 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -673,6 +673,7 @@ static void update_memslots(struct kvm_memslots *slots,
if (!new->npages) {
WARN_ON(!mslots[i].npages);
new->base_gfn = 0;
+ new->flags = 0;
if (mslots[i].npages)
slots->used_slots--;
} else {
--
1.9.1
next reply other threads:[~2015-01-09 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 8:29 Tiejun Chen [this message]
2015-01-27 20:31 ` [PATCH] kvm: update_memslots: clean flags for invalid memslots 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=1420792154-32454-1-git-send-email-tiejun.chen@intel.com \
--to=tiejun.chen@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.