kvm: move cpu synchronization code
[qemu/ar7.git] / include / sysemu / hw_accel.h
blob03812cfeb3579d27a92de0c2f405a261f91ec406
1 /*
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.
9 */
11 #ifndef QEMU_HW_ACCEL_H
12 #define QEMU_HW_ACCEL_H
14 #include "qom/cpu.h"
15 #include "sysemu/hax.h"
16 #include "sysemu/kvm.h"
18 static inline void cpu_synchronize_state(CPUState *cpu)
20 if (kvm_enabled()) {
21 kvm_cpu_synchronize_state(cpu);
25 static inline void cpu_synchronize_post_reset(CPUState *cpu)
27 if (kvm_enabled()) {
28 kvm_cpu_synchronize_post_reset(cpu);
32 static inline void cpu_synchronize_post_init(CPUState *cpu)
34 if (kvm_enabled()) {
35 kvm_cpu_synchronize_post_init(cpu);
39 #endif /* QEMU_HW_ACCEL_H */