#ifndef _ASM_X86_KVM_X86_EMULATE_H
#define _ASM_X86_KVM_X86_EMULATE_H
#include <asm/desc_defs.h>
#include "fpu.h"
struct x86_emulate_ctxt;
enum x86_intercept;
enum x86_intercept_stage;
struct x86_exception { … };
struct x86_instruction_info { … };
#define X86EMUL_CONTINUE …
#define X86EMUL_UNHANDLEABLE …
#define X86EMUL_PROPAGATE_FAULT …
#define X86EMUL_RETRY_INSTR …
#define X86EMUL_CMPXCHG_FAILED …
#define X86EMUL_IO_NEEDED …
#define X86EMUL_INTERCEPTED …
#define X86EMUL_F_WRITE …
#define X86EMUL_F_FETCH …
#define X86EMUL_F_IMPLICIT …
#define X86EMUL_F_INVLPG …
struct x86_emulate_ops { … };
struct operand { … };
struct fetch_cache { … };
struct read_cache { … };
enum x86emul_mode { … };
struct fastop;
fastop_t;
#ifdef CONFIG_X86_64
#define NR_EMULATOR_GPRS …
#else
#define NR_EMULATOR_GPRS …
#endif
struct x86_emulate_ctxt { … };
#define KVM_EMULATOR_BUG_ON(cond, ctxt) …
#define REPE_PREFIX …
#define REPNE_PREFIX …
#define X86EMUL_CPUID_VENDOR_AuthenticAMD_ebx …
#define X86EMUL_CPUID_VENDOR_AuthenticAMD_ecx …
#define X86EMUL_CPUID_VENDOR_AuthenticAMD_edx …
#define X86EMUL_CPUID_VENDOR_AMDisbetterI_ebx …
#define X86EMUL_CPUID_VENDOR_AMDisbetterI_ecx …
#define X86EMUL_CPUID_VENDOR_AMDisbetterI_edx …
#define X86EMUL_CPUID_VENDOR_HygonGenuine_ebx …
#define X86EMUL_CPUID_VENDOR_HygonGenuine_ecx …
#define X86EMUL_CPUID_VENDOR_HygonGenuine_edx …
#define X86EMUL_CPUID_VENDOR_GenuineIntel_ebx …
#define X86EMUL_CPUID_VENDOR_GenuineIntel_ecx …
#define X86EMUL_CPUID_VENDOR_GenuineIntel_edx …
#define X86EMUL_CPUID_VENDOR_CentaurHauls_ebx …
#define X86EMUL_CPUID_VENDOR_CentaurHauls_ecx …
#define X86EMUL_CPUID_VENDOR_CentaurHauls_edx …
static inline bool is_guest_vendor_intel(u32 ebx, u32 ecx, u32 edx)
{ … }
static inline bool is_guest_vendor_amd(u32 ebx, u32 ecx, u32 edx)
{ … }
static inline bool is_guest_vendor_hygon(u32 ebx, u32 ecx, u32 edx)
{ … }
enum x86_intercept_stage { … };
enum x86_intercept { … };
#if defined(CONFIG_X86_32)
#define X86EMUL_MODE_HOST …
#elif defined(CONFIG_X86_64)
#define X86EMUL_MODE_HOST …
#endif
int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len, int emulation_type);
bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);
#define EMULATION_FAILED …
#define EMULATION_OK …
#define EMULATION_RESTART …
#define EMULATION_INTERCEPTED …
void init_decode_cache(struct x86_emulate_ctxt *ctxt);
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt);
int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
u16 tss_selector, int idt_index, int reason,
bool has_error_code, u32 error_code);
int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq);
void emulator_invalidate_register_cache(struct x86_emulate_ctxt *ctxt);
void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt);
bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt);
static inline ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned nr)
{ … }
static inline ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned nr)
{ … }
static inline ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned nr)
{ … }
#endif