]>
Commit | Line | Data |
---|---|---|
c97d6d2c SAGDR |
1 | /* |
2 | * QEMU Hypervisor.framework (HVF) support | |
3 | * | |
4 | * Copyright Google Inc., 2017 | |
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 | ||
11 | /* header to be included in non-HVF-specific code */ | |
a8b991b5 MA |
12 | |
13 | #ifndef HVF_H | |
14 | #define HVF_H | |
c97d6d2c | 15 | |
940e43aa | 16 | #include "qemu/accel.h" |
db1015e9 | 17 | #include "qom/object.h" |
d48ad737 | 18 | |
c97d6d2c | 19 | #ifdef CONFIG_HVF |
c97d6d2c SAGDR |
20 | uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, |
21 | int reg); | |
f291cf54 | 22 | extern bool hvf_allowed; |
92cc3aaa | 23 | #define hvf_enabled() (hvf_allowed) |
f291cf54 | 24 | #else /* !CONFIG_HVF */ |
c97d6d2c SAGDR |
25 | #define hvf_enabled() 0 |
26 | #define hvf_get_supported_cpuid(func, idx, reg) 0 | |
f291cf54 | 27 | #endif /* !CONFIG_HVF */ |
c97d6d2c | 28 | |
c97d6d2c SAGDR |
29 | #define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf") |
30 | ||
3932885a | 31 | typedef struct HVFState HVFState; |
8110fa1d EH |
32 | DECLARE_INSTANCE_CHECKER(HVFState, HVF_STATE, |
33 | TYPE_HVF_ACCEL) | |
c97d6d2c SAGDR |
34 | |
35 | #endif |