summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2008-11-14 16:51:04 +0100
committerAvi Kivity <avi@redhat.com>2008-11-18 16:12:58 +0200
commit66b04e7c01aae7773d978a19c4c195276ecc8feb (patch)
treee65a19a56c65cb4986547ca94c00967b460d81b0 /cpu-defs.h
parentRemove unnecessary bool from qemu-kvm.c (diff)
downloadqemu-kvm-66b04e7c01aae7773d978a19c4c195276ecc8feb.tar.gz
qemu-kvm-66b04e7c01aae7773d978a19c4c195276ecc8feb.tar.bz2
qemu-kvm-66b04e7c01aae7773d978a19c4c195276ecc8feb.zip
Fold vcpu_info into CPUState
Move contents of struct vcpu_info directly into CPU_COMMON. Rename struct qemu_kvm_work_item to qemu_work_item as it really isn't KVM specific. This eliminates the ugly static sized array of struct vcpu_info. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'cpu-defs.h')
-rw-r--r--cpu-defs.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/cpu-defs.h b/cpu-defs.h
index ce3d98ea0..9b1a9532c 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -27,6 +27,7 @@
#include "config.h"
#include <setjmp.h>
#include <inttypes.h>
+#include <pthread.h>
#include "osdep.h"
#ifndef TARGET_LONG_BITS
@@ -145,6 +146,20 @@ typedef struct icount_decr_u16 {
struct kvm_run;
struct KVMState;
+/* forward decleration */
+struct qemu_work_item;
+
+struct KVMCPUState {
+ int sipi_needed;
+ int init;
+ pthread_t thread;
+ int signalled;
+ int stop;
+ int stopped;
+ int created;
+ struct qemu_work_item *queued_work_first, *queued_work_last;
+};
+
#define CPU_TEMP_BUF_NLONGS 128
#define CPU_COMMON \
struct TranslationBlock *current_tb; /* currently executing TB */ \
@@ -206,6 +221,7 @@ struct KVMState;
const char *cpu_model_str; \
struct KVMState *kvm_state; \
struct kvm_run *kvm_run; \
- int kvm_fd;
+ int kvm_fd; \
+ struct KVMCPUState kvm_cpu_state;
#endif