* [PATCH] kvm: update_memslots: clean flags for invalid memslots
@ 2015-01-09 8:29 Tiejun Chen
2015-01-27 20:31 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Tiejun Chen @ 2015-01-09 8:29 UTC (permalink / raw)
To: pbonzini; +Cc: kvm
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] kvm: update_memslots: clean flags for invalid memslots
2015-01-09 8:29 [PATCH] kvm: update_memslots: clean flags for invalid memslots Tiejun Chen
@ 2015-01-27 20:31 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-01-27 20:31 UTC (permalink / raw)
To: Tiejun Chen; +Cc: kvm
On 09/01/2015 09:29, Tiejun Chen wrote:
> 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 {
>
Applied to kvm/queue.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-27 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 8:29 [PATCH] kvm: update_memslots: clean flags for invalid memslots Tiejun Chen
2015-01-27 20:31 ` Paolo Bonzini
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.