diff mbox

[04/10] remove kvm_context from vpcu structure

Message ID 1255111398-15251-5-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa Oct. 9, 2009, 6:03 p.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index b92a68e..5c7376d 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -441,9 +441,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);
@@ -938,8 +936,8 @@  int kvm_run(kvm_vcpu_context_t vcpu, void *env)
     int r;
     int fd = vcpu->fd;
     struct kvm_run *run = vcpu->run;
-    kvm_context_t kvm = vcpu->kvm;
     CPUState *_env = env;
+    kvm_context_t kvm = &_env->kvm_state->kvm_context;
 
   again:
     push_nmi(kvm);
diff --git a/qemu-kvm.h b/qemu-kvm.h
index e51dd2c..4dfd5ea 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -79,7 +79,6 @@  struct kvm_context {
 struct kvm_vcpu_context {
     int fd;
     struct kvm_run *run;
-    struct kvm_context *kvm;
     uint32_t id;
 };