[PATCH 3/9] put env inside vcpu_context

Glauber Costa
2009-07-29T17:49:22Z

this is only to make integration easier.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
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;
--
1.6.2.2