From patchwork Wed Jul 29 17:49:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 38202 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 n6THnTAo032593 for ; Wed, 29 Jul 2009 17:49:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbZG2Rt0 (ORCPT ); Wed, 29 Jul 2009 13:49:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751667AbZG2Rt0 (ORCPT ); Wed, 29 Jul 2009 13:49:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:57768 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbZG2RtY (ORCPT ); Wed, 29 Jul 2009 13:49:24 -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 n6THnOOU032761 for ; Wed, 29 Jul 2009 13:49:24 -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 n6THnNVI027929; Wed, 29 Jul 2009 13:49:24 -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 n6THnJhr017691; Wed, 29 Jul 2009 13:49:23 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 7/9] remove kvm_context from vcpu_context Date: Wed, 29 Jul 2009 13:49:17 -0400 Message-Id: <1248889759-25063-8-git-send-email-glommer@redhat.com> In-Reply-To: <1248889759-25063-7-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> <1248889759-25063-4-git-send-email-glommer@redhat.com> <1248889759-25063-5-git-send-email-glommer@redhat.com> <1248889759-25063-6-git-send-email-glommer@redhat.com> <1248889759-25063-7-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 Signed-off-by: Glauber Costa --- qemu-kvm.c | 4 +--- qemu-kvm.h | 1 - 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 5bcb637..6b9b29f 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -433,9 +433,7 @@ kvm_vcpu_context_t kvm_create_vcpu(CPUState *env, int id) long mmap_size; int r; kvm_vcpu_context_t vcpu_ctx = qemu_malloc(sizeof(struct kvm_vcpu_context)); - kvm_context_t kvm = kvm_context; - vcpu_ctx->kvm = kvm; vcpu_ctx->id = id; r = kvm_vm_ioctl(kvm_state, KVM_CREATE_VCPU, id); @@ -925,7 +923,7 @@ int kvm_run(kvm_vcpu_context_t vcpu, void *env) int r; int fd = vcpu->env->kvm_fd; struct kvm_run *run = vcpu->env->kvm_run; - kvm_context_t kvm = vcpu->kvm; + kvm_context_t kvm = &vcpu->env->kvm_state->kvm_context; again: diff --git a/qemu-kvm.h b/qemu-kvm.h index c97e6a9..1dc9873 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -71,7 +71,6 @@ struct kvm_context { struct kvm_vcpu_context { CPUState *env; - struct kvm_context *kvm; uint32_t id; };