port qemu-kvm's on_vcpu code

run_on_cpu allows to execute work on a given CPUState context.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Marcelo Tosatti 2010-05-04 09:45:22 -03:00
parent 1fbb22e5f8
commit e82bcec25f
4 changed files with 64 additions and 0 deletions

View file

@ -132,6 +132,7 @@ typedef struct icount_decr_u16 {
struct kvm_run;
struct KVMState;
struct qemu_work_item;
typedef struct CPUBreakpoint {
target_ulong pc;
@ -204,6 +205,7 @@ typedef struct CPUWatchpoint {
uint32_t created; \
struct QemuThread *thread; \
struct QemuCond *halt_cond; \
struct qemu_work_item *queued_work_first, *queued_work_last; \
const char *cpu_model_str; \
struct KVMState *kvm_state; \
struct kvm_run *kvm_run; \