master
h 36 lines 1.08 KB
Raw
1 /*
2 * Accelerator CPUS Interface
3 *
4 * Copyright 2020 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 SYSTEM_WHPX_ACCEL_OPS_H
11 #define SYSTEM_WHPX_ACCEL_OPS_H
12
13 #include "system/cpus.h"
14
15 int whpx_init_vcpu(CPUState *cpu);
16 int whpx_vcpu_exec(CPUState *cpu);
17 void whpx_destroy_vcpu(CPUState *cpu);
18 void whpx_vcpu_kick(CPUState *cpu);
19
20 void whpx_cpu_synchronize_state(CPUState *cpu);
21 void whpx_cpu_synchronize_post_reset(CPUState *cpu);
22 void whpx_cpu_synchronize_post_init(CPUState *cpu);
23 void whpx_cpu_synchronize_pre_loadvm(CPUState *cpu);
24
25 typedef enum WHPXStateLevel {
26 /* subset of runtime state for faster returns from vmexit */
27 WHPX_LEVEL_FAST_RUNTIME_STATE,
28 /* state subset only touched by the VCPU itself during runtime */
29 WHPX_LEVEL_RUNTIME_STATE,
30 /* state subset modified during VCPU reset */
31 WHPX_LEVEL_RESET_STATE,
32 /* full state set, modified during initialization or on vmload */
33 WHPX_LEVEL_FULL_STATE
34 } WHPXStateLevel;
35
36 #endif /* TARGET_I386_WHPX_ACCEL_OPS_H */