summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-07-21 18:13:10 -0400
committerMarcelo Tosatti <mtosatti@redhat.com>2009-07-22 16:48:49 -0300
commit419a1c8db3e8c8c485d487f5b811827e191c074c (patch)
tree07a1e900ecd97a94d150b4c49af6c9493b6752c1
parentreuse env stop and stopped states (diff)
downloadqemu-kvm-419a1c8db3e8c8c485d487f5b811827e191c074c.tar.gz
qemu-kvm-419a1c8db3e8c8c485d487f5b811827e191c074c.tar.bz2
qemu-kvm-419a1c8db3e8c8c485d487f5b811827e191c074c.zip
remove created from kvm_state
Again, CPUState has it, and it means exactly that. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--cpu-defs.h1
-rw-r--r--qemu-kvm.c10
2 files changed, 5 insertions, 6 deletions
diff --git a/cpu-defs.h b/cpu-defs.h
index fce366f3f..ce9f96ab7 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -142,7 +142,6 @@ struct qemu_work_item;
struct KVMCPUState {
pthread_t thread;
int signalled;
- int created;
void *vcpu_ctx;
struct qemu_work_item *queued_work_first, *queued_work_last;
};
diff --git a/qemu-kvm.c b/qemu-kvm.c
index fd28b39d4..cb85dbcdb 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1663,12 +1663,12 @@ void kvm_update_interrupt_request(CPUState *env)
int signal = 0;
if (env) {
- if (!current_env || !current_env->kvm_cpu_state.created)
+ if (!current_env || !current_env->created)
signal = 1;
/*
* Testing for created here is really redundant
*/
- if (current_env && current_env->kvm_cpu_state.created &&
+ if (current_env && current_env->created &&
env != current_env && !env->kvm_cpu_state.signalled)
signal = 1;
@@ -1948,7 +1948,7 @@ static void *ap_main_loop(void *_env)
/* signal VCPU creation */
pthread_mutex_lock(&qemu_mutex);
- current_env->kvm_cpu_state.created = 1;
+ current_env->created = 1;
pthread_cond_signal(&qemu_vcpu_cond);
/* and wait for machine initialization */
@@ -1964,13 +1964,13 @@ void kvm_init_vcpu(CPUState *env)
{
pthread_create(&env->kvm_cpu_state.thread, NULL, ap_main_loop, env);
- while (env->kvm_cpu_state.created == 0)
+ while (env->created == 0)
qemu_cond_wait(&qemu_vcpu_cond);
}
int kvm_vcpu_inited(CPUState *env)
{
- return env->kvm_cpu_state.created;
+ return env->created;
}
#ifdef TARGET_I386