]> git.proxmox.com Git - mirror_qemu.git/blame - include/sysemu/accel-ops.h
whpx: Added support for breakpoints and stepping
[mirror_qemu.git] / include / sysemu / accel-ops.h
CommitLineData
b86f59c7
CF
1/*
2 * Accelerator OPS, used for cpus.c module
3 *
4 * Copyright 2021 SUSE LLC
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
9
10#ifndef ACCEL_OPS_H
11#define ACCEL_OPS_H
12
13#include "qom/object.h"
14
15#define ACCEL_OPS_SUFFIX "-ops"
16#define TYPE_ACCEL_OPS "accel" ACCEL_OPS_SUFFIX
17#define ACCEL_OPS_NAME(name) (name "-" TYPE_ACCEL_OPS)
18
19typedef struct AccelOpsClass AccelOpsClass;
20DECLARE_CLASS_CHECKERS(AccelOpsClass, ACCEL_OPS, TYPE_ACCEL_OPS)
21
22/* cpus.c operations interface */
23struct AccelOpsClass {
24 /*< private >*/
25 ObjectClass parent_class;
26 /*< public >*/
27
28 /* initialization function called when accel is chosen */
29 void (*ops_init)(AccelOpsClass *ops);
30
39196355
PMD
31 bool (*cpus_are_resettable)(void);
32
b86f59c7
CF
33 void (*create_vcpu_thread)(CPUState *cpu); /* MANDATORY NON-NULL */
34 void (*kick_vcpu_thread)(CPUState *cpu);
ad7d684d 35 bool (*cpu_thread_is_idle)(CPUState *cpu);
b86f59c7
CF
36
37 void (*synchronize_post_reset)(CPUState *cpu);
38 void (*synchronize_post_init)(CPUState *cpu);
39 void (*synchronize_state)(CPUState *cpu);
40 void (*synchronize_pre_loadvm)(CPUState *cpu);
d7482ffe 41 void (*synchronize_pre_resume)(bool step_pending);
b86f59c7
CF
42
43 void (*handle_interrupt)(CPUState *cpu, int mask);
44
45 int64_t (*get_virtual_clock)(void);
46 int64_t (*get_elapsed_ticks)(void);
47};
48
49#endif /* ACCEL_OPS_H */