2 * QEMU Hypervisor.framework (HVF) support
4 * Copyright Google Inc., 2017
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 /* header to be included in non-HVF-specific code */
16 #include "qemu/accel.h"
17 #include "qom/object.h"
23 uint32_t hvf_get_supported_cpuid(uint32_t func
, uint32_t idx
,
25 extern bool hvf_allowed
;
26 #define hvf_enabled() (hvf_allowed)
27 #else /* !CONFIG_HVF */
28 #define hvf_enabled() 0
29 #define hvf_get_supported_cpuid(func, idx, reg) 0
30 #endif /* !CONFIG_HVF */
32 #endif /* NEED_CPU_H */
34 #define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
36 typedef struct HVFState HVFState
;
37 DECLARE_INSTANCE_CHECKER(HVFState
, HVF_STATE
,
41 struct hvf_sw_breakpoint
{
43 target_ulong saved_insn
;
45 QTAILQ_ENTRY(hvf_sw_breakpoint
) entry
;
48 struct hvf_sw_breakpoint
*hvf_find_sw_breakpoint(CPUState
*cpu
,
50 int hvf_sw_breakpoints_active(CPUState
*cpu
);
52 int hvf_arch_insert_sw_breakpoint(CPUState
*cpu
, struct hvf_sw_breakpoint
*bp
);
53 int hvf_arch_remove_sw_breakpoint(CPUState
*cpu
, struct hvf_sw_breakpoint
*bp
);
54 int hvf_arch_insert_hw_breakpoint(target_ulong addr
, target_ulong len
,
56 int hvf_arch_remove_hw_breakpoint(target_ulong addr
, target_ulong len
,
58 void hvf_arch_remove_all_hw_breakpoints(void);
61 * hvf_update_guest_debug:
62 * @cs: CPUState for the CPU to update
64 * Update guest to enable or disable debugging. Per-arch specifics will be
65 * handled by calling down to hvf_arch_update_guest_debug.
67 int hvf_update_guest_debug(CPUState
*cpu
);
68 void hvf_arch_update_guest_debug(CPUState
*cpu
);
71 * Return whether the guest supports debugging.
73 bool hvf_arch_supports_guest_debug(void);
74 #endif /* NEED_CPU_H */