2010-03-30 03:23:50 +08:00
|
|
|
#ifndef QEMU_CPUS_H
|
|
|
|
#define QEMU_CPUS_H
|
|
|
|
|
2021-02-05 00:39:25 +08:00
|
|
|
#include "sysemu/accel-ops.h"
|
2017-03-03 19:01:16 +08:00
|
|
|
|
2021-02-05 00:39:25 +08:00
|
|
|
/* register accel-specific operations */
|
|
|
|
void cpus_register_accel(const AccelOpsClass *i);
|
2020-07-31 18:23:42 +08:00
|
|
|
|
2022-09-29 19:42:24 +08:00
|
|
|
/* return registers ops */
|
|
|
|
const AccelOpsClass *cpus_get_accel(void);
|
|
|
|
|
2021-02-05 00:39:25 +08:00
|
|
|
/* accel/dummy-cpus.c */
|
2020-07-31 18:23:42 +08:00
|
|
|
|
2021-02-05 00:39:25 +08:00
|
|
|
/* Create a dummy vcpu for AccelOpsClass->create_vcpu_thread */
|
2020-10-13 22:05:10 +08:00
|
|
|
void dummy_start_vcpu_thread(CPUState *);
|
|
|
|
|
2020-07-31 18:23:42 +08:00
|
|
|
/* interface available for cpus accelerator threads */
|
|
|
|
|
|
|
|
/* For temporary buffers for forming a name */
|
|
|
|
#define VCPU_THREAD_NAME_SIZE 16
|
|
|
|
|
|
|
|
void cpus_kick_thread(CPUState *cpu);
|
|
|
|
bool cpu_work_list_empty(CPUState *cpu);
|
|
|
|
bool cpu_thread_is_idle(CPUState *cpu);
|
2020-08-19 19:17:19 +08:00
|
|
|
bool all_cpu_threads_idle(void);
|
2020-07-31 18:23:42 +08:00
|
|
|
bool cpu_can_run(CPUState *cpu);
|
|
|
|
void qemu_wait_io_event_common(CPUState *cpu);
|
|
|
|
void qemu_wait_io_event(CPUState *cpu);
|
|
|
|
void cpu_thread_signal_created(CPUState *cpu);
|
|
|
|
void cpu_thread_signal_destroyed(CPUState *cpu);
|
|
|
|
void cpu_handle_guest_debug(CPUState *cpu);
|
|
|
|
|
|
|
|
/* end interface for cpus accelerator threads */
|
|
|
|
|
2015-08-11 16:52:46 +08:00
|
|
|
bool qemu_in_vcpu_thread(void);
|
2011-09-13 16:30:52 +08:00
|
|
|
void qemu_init_cpu_loop(void);
|
2010-03-30 03:23:50 +08:00
|
|
|
void resume_all_vcpus(void);
|
|
|
|
void pause_all_vcpus(void);
|
2011-02-02 05:15:43 +08:00
|
|
|
void cpu_stop_current(void);
|
2016-03-15 23:47:38 +08:00
|
|
|
|
|
|
|
extern int icount_align_option;
|
|
|
|
|
|
|
|
/* Unblock cpu */
|
|
|
|
void qemu_cpu_kick_self(void);
|
2010-03-30 03:23:50 +08:00
|
|
|
|
2021-01-27 01:36:47 +08:00
|
|
|
bool cpus_are_resettable(void);
|
|
|
|
|
2011-03-28 00:05:08 +08:00
|
|
|
void cpu_synchronize_all_states(void);
|
|
|
|
void cpu_synchronize_all_post_reset(void);
|
|
|
|
void cpu_synchronize_all_post_init(void);
|
2017-05-26 12:46:28 +08:00
|
|
|
void cpu_synchronize_all_pre_loadvm(void);
|
2011-03-28 00:05:08 +08:00
|
|
|
|
2013-01-23 04:25:05 +08:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2010-03-30 03:23:50 +08:00
|
|
|
/* vl.c */
|
2016-09-16 23:50:24 +08:00
|
|
|
/* *-user doesn't have configurable SMP topology */
|
2010-03-30 03:23:50 +08:00
|
|
|
extern int smp_cores;
|
|
|
|
extern int smp_threads;
|
2013-01-23 04:25:05 +08:00
|
|
|
#endif
|
|
|
|
|
2010-03-30 03:23:50 +08:00
|
|
|
#endif
|