2 * QEMU Hardware accelertors support
4 * Copyright 2016 Google, Inc.
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.
11 #ifndef QEMU_HW_ACCEL_H
12 #define QEMU_HW_ACCEL_H
14 #include "hw/core/cpu.h"
15 #include "sysemu/hax.h"
16 #include "sysemu/kvm.h"
17 #include "sysemu/hvf.h"
18 #include "sysemu/whpx.h"
20 static inline void cpu_synchronize_state(CPUState
*cpu
)
23 kvm_cpu_synchronize_state(cpu
);
26 hax_cpu_synchronize_state(cpu
);
29 hvf_cpu_synchronize_state(cpu
);
32 whpx_cpu_synchronize_state(cpu
);
36 static inline void cpu_synchronize_post_reset(CPUState
*cpu
)
39 kvm_cpu_synchronize_post_reset(cpu
);
42 hax_cpu_synchronize_post_reset(cpu
);
45 hvf_cpu_synchronize_post_reset(cpu
);
48 whpx_cpu_synchronize_post_reset(cpu
);
52 static inline void cpu_synchronize_post_init(CPUState
*cpu
)
55 kvm_cpu_synchronize_post_init(cpu
);
58 hax_cpu_synchronize_post_init(cpu
);
61 hvf_cpu_synchronize_post_init(cpu
);
64 whpx_cpu_synchronize_post_init(cpu
);
68 static inline void cpu_synchronize_pre_loadvm(CPUState
*cpu
)
71 kvm_cpu_synchronize_pre_loadvm(cpu
);
74 hax_cpu_synchronize_pre_loadvm(cpu
);
77 hvf_cpu_synchronize_pre_loadvm(cpu
);
80 whpx_cpu_synchronize_pre_loadvm(cpu
);
84 #endif /* QEMU_HW_ACCEL_H */