From d7ff1a1f30881ecd89db0aef45eb0373bbc4229a Mon Sep 17 00:00:00 2001 From: Glauber Costa <glommer@redhat.com> Date: Wed, 23 Jun 2010 13:51:12 -0300 Subject: [PATCH 1/2] KVM: Keep slot ID in memory slot structure RH-Author: Glauber Costa <glommer@redhat.com> Message-id: <patch-10115-clone-for-rhel5-rhel56> Patchwork-id: 10140 O-Subject: [RHEL5.6/z patch 1/2] KVM: Keep slot ID in memory slot structure Bugzilla: 606953 RH-Acked-by: Avi Kivity <avi@redhat.com> RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> RH-Acked-by: Gleb Natapov <gleb@redhat.com> RH-Bugzilla: 606953 RH-Upstream-status: kvm/master May be used for distinguishing between internal and user slots, or for sorting slots in size order. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Glauber Costa <glommer@redhat.com> --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9259209..2d3afd2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -105,6 +105,7 @@ struct kvm_memory_slot { } *lpage_info; unsigned long userspace_addr; int user_alloc; + int id; }; struct kvm_kernel_irq_routing_entry { diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2c18de5..de582db 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1110,6 +1110,7 @@ int __kvm_set_memory_region(struct kvm *kvm, new = old = *memslot; + new.id = mem->slot; new.base_gfn = base_gfn; new.npages = npages; new.flags = mem->flags; -- 1.7.0.3