From patchwork Mon Jun 21 08:18:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 107143 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5L8IIOj010821 for ; Mon, 21 Jun 2010 08:18:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756431Ab0FUISQ (ORCPT ); Mon, 21 Jun 2010 04:18:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4619 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754770Ab0FUISP (ORCPT ); Mon, 21 Jun 2010 04:18:15 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5L8IFj4016357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Jun 2010 04:18:15 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5L8IEKa001466 for ; Mon, 21 Jun 2010 04:18:15 -0400 Received: from file.tlv.redhat.com (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 37FEF250ADA; Mon, 21 Jun 2010 11:18:14 +0300 (IDT) From: Avi Kivity To: kvm@vger.kernel.org, Marcelo Tosatti Subject: [PATCH 1/2] KVM: Keep slot ID in memory slot structure Date: Mon, 21 Jun 2010 11:18:12 +0300 Message-Id: <1277108293-9918-2-git-send-email-avi@redhat.com> In-Reply-To: <1277108293-9918-1-git-send-email-avi@redhat.com> References: <1277108293-9918-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 21 Jun 2010 08:18:18 +0000 (UTC) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 2d96555..d84bf40 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -124,6 +124,7 @@ struct kvm_memory_slot { } *lpage_info[KVM_NR_PAGE_SIZES - 1]; unsigned long userspace_addr; int user_alloc; + int id; }; static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 84a0906..add43a3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -570,6 +570,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;