2 * QEMU Hypervisor.framework (HVF) support
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
9 /* header to be included in HVF-specific code */
15 #include <Hypervisor/Hypervisor.h>
16 typedef hv_vcpu_t hvf_vcpuid
;
18 #include <Hypervisor/hv.h>
19 typedef hv_vcpuid_t hvf_vcpuid
;
23 #define HVF_SLOT_LOG (1 << 0)
25 typedef struct hvf_slot
{
34 typedef struct hvf_vcpu_caps
{
35 uint64_t vmx_cap_pinbased
;
36 uint64_t vmx_cap_procbased
;
37 uint64_t vmx_cap_procbased2
;
38 uint64_t vmx_cap_entry
;
39 uint64_t vmx_cap_exit
;
40 uint64_t vmx_cap_preemption_timer
;
48 hvf_vcpu_caps
*hvf_caps
;
49 uint64_t vtimer_offset
;
50 QTAILQ_HEAD(, hvf_sw_breakpoint
) hvf_sw_breakpoints
;
52 extern HVFState
*hvf_state
;
54 struct AccelCPUState
{
58 sigset_t unblock_ipi_mask
;
59 bool guest_debug_enabled
;
63 void assert_hvf_ok_impl(hv_return_t ret
, const char *file
, unsigned int line
,
65 #define assert_hvf_ok(EX) assert_hvf_ok_impl((EX), __FILE__, __LINE__, #EX)
66 const char *hvf_return_string(hv_return_t ret
);
67 int hvf_arch_init(void);
68 hv_return_t
hvf_arch_vm_create(MachineState
*ms
, uint32_t pa_range
);
69 int hvf_arch_init_vcpu(CPUState
*cpu
);
70 void hvf_arch_vcpu_destroy(CPUState
*cpu
);
71 int hvf_vcpu_exec(CPUState
*);
72 hvf_slot
*hvf_find_overlap_slot(uint64_t, uint64_t);
73 int hvf_put_registers(CPUState
*);
74 int hvf_get_registers(CPUState
*);
75 void hvf_kick_vcpu_thread(CPUState
*cpu
);