xref: /openbmc/qemu/include/sysemu/whpx.h (revision a68694cd)
1 /*
2  * QEMU Windows Hypervisor Platform accelerator (WHPX) support
3  *
4  * Copyright Microsoft, Corp. 2017
5  *
6  * Authors:
7  *
8  * This work is licensed under the terms of the GNU GPL, version 2 or later.
9  * See the COPYING file in the top-level directory.
10  *
11  */
12 
13 #ifndef QEMU_WHPX_H
14 #define QEMU_WHPX_H
15 
16 
17 int whpx_init_vcpu(CPUState *cpu);
18 int whpx_vcpu_exec(CPUState *cpu);
19 void whpx_destroy_vcpu(CPUState *cpu);
20 void whpx_vcpu_kick(CPUState *cpu);
21 
22 
23 void whpx_cpu_synchronize_state(CPUState *cpu);
24 void whpx_cpu_synchronize_post_reset(CPUState *cpu);
25 void whpx_cpu_synchronize_post_init(CPUState *cpu);
26 void whpx_cpu_synchronize_pre_loadvm(CPUState *cpu);
27 
28 #ifdef CONFIG_WHPX
29 
30 int whpx_enabled(void);
31 
32 #else /* CONFIG_WHPX */
33 
34 #define whpx_enabled() (0)
35 
36 #endif /* CONFIG_WHPX */
37 
38 /* state subset only touched by the VCPU itself during runtime */
39 #define WHPX_SET_RUNTIME_STATE   1
40 /* state subset modified during VCPU reset */
41 #define WHPX_SET_RESET_STATE     2
42 /* full state set, modified during initialization or on vmload */
43 #define WHPX_SET_FULL_STATE      3
44 
45 #endif /* QEMU_WHPX_H */
46