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
9extern int hax_disabled;
10struct hax_vcpu_state;
11
12#ifdef CONFIG_HAX
13int hax_enabled(void);
14int hax_set_ramsize(uint64_t ramsize);
15int hax_init(int smp_cpus);
16int hax_init_vcpu(CPUState *cpu);
17/* Execute vcpu in non-root mode */
18int hax_vcpu_exec(CPUState *cpu);
19/* Sync vcpu state with HAX driver */
20int hax_sync_vcpus(void);
21void hax_vcpu_sync_state(CPUState *cpu, int modified);
22int hax_populate_ram(uint64_t va, uint32_t size);
23int hax_set_phys_mem(hwaddr start_addr,
24                     ram_addr_t size, ram_addr_t phys_offset);
25/* Check if QEMU need emulate guest execution */
26int hax_vcpu_emulation_mode(CPUState *cpu);
27int hax_stop_emulation(CPUState *cpu);
28int hax_stop_translate(CPUState *cpu);
29int hax_arch_get_registers(CPUState *cpu);
30void hax_raise_event(CPUState *cpu);
31void 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