X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..a991bd8d3e7fe02dbca0644054bab73c5b75324a:/osfmk/kern/hv_support.h diff --git a/osfmk/kern/hv_support.h b/osfmk/kern/hv_support.h index 72d5bd2cf..e1dcf768d 100644 --- a/osfmk/kern/hv_support.h +++ b/osfmk/kern/hv_support.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Apple Inc. All rights reserved. + * Copyright (c) 2018 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -33,53 +33,13 @@ extern "C" { #endif -#include -#include - -typedef enum { - HV_DEBUG_STATE -} hv_volatile_state_t; - -typedef enum { - HV_TASK_TRAP = 0, - HV_THREAD_TRAP = 1 -} hv_trap_type_t; - -typedef kern_return_t (*hv_trap_t) (void *target, uint64_t arg); - -typedef struct { - const hv_trap_t *traps; - unsigned trap_count; -} hv_trap_table_t; - -typedef struct { - void (*dispatch)(void *vcpu); - void (*preempt)(void *vcpu); - void (*suspend)(void); - void (*thread_destroy)(void *vcpu); - void (*task_destroy)(void *vm); - void (*volatile_state)(void *vcpu, int state); - void (*memory_pressure)(void); -} hv_callbacks_t; - -extern hv_callbacks_t hv_callbacks; -extern int hv_support_available; +#if defined(__x86_64__) +#include +#else +#error unsupported arch +#endif -extern void hv_support_init(void); -extern int hv_get_support(void); -extern void hv_set_task_target(void *target); -extern void hv_set_thread_target(void *target); -extern void *hv_get_task_target(void); -extern void *hv_get_thread_target(void); -extern int hv_get_volatile_state(hv_volatile_state_t state); -extern kern_return_t hv_set_traps(hv_trap_type_t trap_type, - const hv_trap_t *traps, unsigned trap_count); -extern void hv_release_traps(hv_trap_type_t trap_type); -extern kern_return_t hv_set_callbacks(hv_callbacks_t callbacks); -extern void hv_release_callbacks(void); -extern void hv_suspend(void); -extern kern_return_t hv_task_trap(uint64_t index, uint64_t arg); -extern kern_return_t hv_thread_trap(uint64_t index, uint64_t arg); +extern int hv_disable; #if defined(__cplusplus) }