2 * QEMU Hypervisor.framework support
4 * This work is licensed under the terms of the GNU GPL, version 2. See
5 * the COPYING file in the top-level directory.
7 * Contributions after 2012-01-13 are licensed under the terms of the
8 * GNU GPL, version 2 or (at your option) any later version.
11 #include "qemu/osdep.h"
12 #include "qemu/error-report.h"
13 #include "sysemu/hvf.h"
14 #include "sysemu/hvf_int.h"
16 const char *hvf_return_string(hv_return_t ret
)
19 case HV_SUCCESS
: return "HV_SUCCESS";
20 case HV_ERROR
: return "HV_ERROR";
21 case HV_BUSY
: return "HV_BUSY";
22 case HV_BAD_ARGUMENT
: return "HV_BAD_ARGUMENT";
23 case HV_NO_RESOURCES
: return "HV_NO_RESOURCES";
24 case HV_NO_DEVICE
: return "HV_NO_DEVICE";
25 case HV_UNSUPPORTED
: return "HV_UNSUPPORTED";
26 case HV_DENIED
: return "HV_DENIED";
27 default: return "[unknown hv_return value]";
31 void assert_hvf_ok_impl(hv_return_t ret
, const char *file
, unsigned int line
,
34 if (ret
== HV_SUCCESS
) {
38 error_report("Error: %s = %s (0x%x, at %s:%u)",
39 exp
, hvf_return_string(ret
), ret
, file
, line
);
44 struct hvf_sw_breakpoint
*hvf_find_sw_breakpoint(CPUState
*cpu
, vaddr pc
)
46 struct hvf_sw_breakpoint
*bp
;
48 QTAILQ_FOREACH(bp
, &hvf_state
->hvf_sw_breakpoints
, entry
) {
56 int hvf_sw_breakpoints_active(CPUState
*cpu
)
58 return !QTAILQ_EMPTY(&hvf_state
->hvf_sw_breakpoints
);
61 int hvf_update_guest_debug(CPUState
*cpu
)
63 hvf_arch_update_guest_debug(cpu
);