From patchwork Wed Jul 29 17:49:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 38201 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6THnTAn032593 for ; Wed, 29 Jul 2009 17:49:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbZG2Rt0 (ORCPT ); Wed, 29 Jul 2009 13:49:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751606AbZG2RtZ (ORCPT ); Wed, 29 Jul 2009 13:49:25 -0400 Received: from mx2.redhat.com ([66.187.237.31]:57764 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbZG2RtW (ORCPT ); Wed, 29 Jul 2009 13:49:22 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6THnNsU032740 for ; Wed, 29 Jul 2009 13:49:23 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6THnL87027918; Wed, 29 Jul 2009 13:49:22 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6THnJhn017691; Wed, 29 Jul 2009 13:49:21 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 3/9] put env inside vcpu_context Date: Wed, 29 Jul 2009 13:49:13 -0400 Message-Id: <1248889759-25063-4-git-send-email-glommer@redhat.com> In-Reply-To: <1248889759-25063-3-git-send-email-glommer@redhat.com> References: <1248889759-25063-1-git-send-email-glommer@redhat.com> <1248889759-25063-2-git-send-email-glommer@redhat.com> <1248889759-25063-3-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org this is only to make integration easier. Signed-off-by: Glauber Costa --- qemu-kvm.c | 1 + qemu-kvm.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 65042d2..ba937ca 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -448,6 +448,7 @@ kvm_vcpu_context_t kvm_create_vcpu(CPUState *env, int id) env->kvm_fd = r; env->kvm_state = kvm_state; + vcpu_ctx->env = env; mmap_size = kvm_ioctl(kvm_state, KVM_GET_VCPU_MMAP_SIZE, 0); if (mmap_size < 0) { diff --git a/qemu-kvm.h b/qemu-kvm.h index 8dfdf6b..440afba 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -71,6 +71,7 @@ struct kvm_context { struct kvm_vcpu_context { + CPUState *env; int fd; struct kvm_run *run; struct kvm_context *kvm;