diff mbox

[7/9] remove kvm_context from vcpu_context

Message ID 1248889759-25063-8-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa July 29, 2009, 5:49 p.m. UTC
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 qemu-kvm.c |    4 +---
 qemu-kvm.h |    1 -
 2 files changed, 1 insertions(+), 4 deletions(-)
diff mbox

Patch

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;
 };