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