• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* header to be included in non-HAX-specific code */
2 #ifndef _HAX_H
3 #define _HAX_H
4 
5 #include "config.h"
6 #include "qemu-common.h"
7 #include "cpu.h"
8 
9 extern int hax_disabled;
10 struct hax_vcpu_state;
11 
12 #ifdef CONFIG_HAX
13 int hax_enabled(void);
14 int hax_set_ramsize(uint64_t ramsize);
15 int hax_init(int smp_cpus);
16 int hax_init_vcpu(CPUState *env);
17 /* Execute vcpu in non-root mode */
18 int hax_vcpu_exec(CPUState *env);
19 /* Sync vcpu state with HAX driver */
20 int hax_sync_vcpus(void);
21 void hax_vcpu_sync_state(CPUState *env, int modified);
22 int hax_populate_ram(uint64_t va, uint32_t size);
23 int hax_set_phys_mem(target_phys_addr_t start_addr,
24                      ram_addr_t size, ram_addr_t phys_offset);
25 /* Check if QEMU need emulate guest execution */
26 int hax_vcpu_emulation_mode(CPUState *env);
27 int hax_stop_emulation(CPUState *env);
28 int hax_stop_translate(CPUState *env);
29 int hax_arch_get_registers(CPUState *env);
30 void hax_raise_event(CPUState *env);
31 void hax_reset_vcpu_state(void *opaque);
32 
33 #include "target-i386/hax-interface.h"
34 
35 #else
36 #define hax_enabled() (0)
37 #endif
38 
39 #endif
40