ftgmac100: Fix registers that can be read
[qemu.git] / include / sysemu / hw_accel.h
blobe128f8b06bf2d8a1dbfb7b95f0a9e20801e95c18
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 "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)
22 if (kvm_enabled()) {
23 kvm_cpu_synchronize_state(cpu);
25 if (hax_enabled()) {
26 hax_cpu_synchronize_state(cpu);
28 if (hvf_enabled()) {
29 hvf_cpu_synchronize_state(cpu);
31 if (whpx_enabled()) {
32 whpx_cpu_synchronize_state(cpu);
36 static inline void cpu_synchronize_post_reset(CPUState *cpu)
38 if (kvm_enabled()) {
39 kvm_cpu_synchronize_post_reset(cpu);
41 if (hax_enabled()) {
42 hax_cpu_synchronize_post_reset(cpu);
44 if (hvf_enabled()) {
45 hvf_cpu_synchronize_post_reset(cpu);
47 if (whpx_enabled()) {
48 whpx_cpu_synchronize_post_reset(cpu);
52 static inline void cpu_synchronize_post_init(CPUState *cpu)
54 if (kvm_enabled()) {
55 kvm_cpu_synchronize_post_init(cpu);
57 if (hax_enabled()) {
58 hax_cpu_synchronize_post_init(cpu);
60 if (hvf_enabled()) {
61 hvf_cpu_synchronize_post_init(cpu);
63 if (whpx_enabled()) {
64 whpx_cpu_synchronize_post_init(cpu);
68 static inline void cpu_synchronize_pre_loadvm(CPUState *cpu)
70 if (kvm_enabled()) {
71 kvm_cpu_synchronize_pre_loadvm(cpu);
73 if (hax_enabled()) {
74 hax_cpu_synchronize_pre_loadvm(cpu);
76 if (hvf_enabled()) {
77 hvf_cpu_synchronize_pre_loadvm(cpu);
79 if (whpx_enabled()) {
80 whpx_cpu_synchronize_pre_loadvm(cpu);
84 #endif /* QEMU_HW_ACCEL_H */