Lines Matching refs:x86_emulate_ctxt
207 int (*execute)(struct x86_emulate_ctxt *ctxt);
214 int (*check_perm)(struct x86_emulate_ctxt *ctxt);
256 static ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_read()
265 static ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_write()
272 static ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_rmw()
278 static void writeback_registers(struct x86_emulate_ctxt *ctxt) in writeback_registers()
286 static void invalidate_registers(struct x86_emulate_ctxt *ctxt) in invalidate_registers()
304 static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *));
422 static int emulator_check_intercept(struct x86_emulate_ctxt *ctxt, in emulator_check_intercept()
448 static inline unsigned long ad_mask(struct x86_emulate_ctxt *ctxt) in ad_mask()
453 static ulong stack_mask(struct x86_emulate_ctxt *ctxt) in stack_mask()
464 static int stack_size(struct x86_emulate_ctxt *ctxt) in stack_size()
471 address_mask(struct x86_emulate_ctxt *ctxt, unsigned long reg) in address_mask()
480 register_address(struct x86_emulate_ctxt *ctxt, unsigned long reg) in register_address()
491 register_address_increment(struct x86_emulate_ctxt *ctxt, unsigned long *reg, int inc) in register_address_increment()
502 static void rsp_increment(struct x86_emulate_ctxt *ctxt, int inc) in rsp_increment()
514 static unsigned long seg_base(struct x86_emulate_ctxt *ctxt, int seg) in seg_base()
522 static int emulate_exception(struct x86_emulate_ctxt *ctxt, int vec, in emulate_exception()
532 static int emulate_db(struct x86_emulate_ctxt *ctxt) in emulate_db()
537 static int emulate_gp(struct x86_emulate_ctxt *ctxt, int err) in emulate_gp()
542 static int emulate_ss(struct x86_emulate_ctxt *ctxt, int err) in emulate_ss()
547 static int emulate_ud(struct x86_emulate_ctxt *ctxt) in emulate_ud()
552 static int emulate_ts(struct x86_emulate_ctxt *ctxt, int err) in emulate_ts()
557 static int emulate_de(struct x86_emulate_ctxt *ctxt) in emulate_de()
562 static int emulate_nm(struct x86_emulate_ctxt *ctxt) in emulate_nm()
567 static inline int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst, in assign_eip_far()
591 static inline int assign_eip_near(struct x86_emulate_ctxt *ctxt, ulong dst) in assign_eip_near()
596 static inline int jmp_rel(struct x86_emulate_ctxt *ctxt, int rel) in jmp_rel()
601 static u16 get_segment_selector(struct x86_emulate_ctxt *ctxt, unsigned seg) in get_segment_selector()
610 static void set_segment_selector(struct x86_emulate_ctxt *ctxt, u16 selector, in set_segment_selector()
629 static bool insn_aligned(struct x86_emulate_ctxt *ctxt, unsigned size) in insn_aligned()
644 static int __linearize(struct x86_emulate_ctxt *ctxt, in __linearize()
732 static int linearize(struct x86_emulate_ctxt *ctxt, in linearize()
742 static int segmented_read_std(struct x86_emulate_ctxt *ctxt, in segmented_read_std()
760 static int __do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, int op_size) in __do_insn_fetch_bytes()
803 static __always_inline int do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, in do_insn_fetch_bytes()
842 static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg, in decode_register()
855 static int read_descriptor(struct x86_emulate_ctxt *ctxt, in read_descriptor()
943 static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg) in read_sse_reg()
970 static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, in write_sse_reg()
998 static void read_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) in read_mmx_reg()
1015 static void write_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) in write_mmx_reg()
1032 static int em_fninit(struct x86_emulate_ctxt *ctxt) in em_fninit()
1043 static int em_fnstcw(struct x86_emulate_ctxt *ctxt) in em_fnstcw()
1061 static int em_fnstsw(struct x86_emulate_ctxt *ctxt) in em_fnstsw()
1079 static void decode_register_operand(struct x86_emulate_ctxt *ctxt, in decode_register_operand()
1110 static void adjust_modrm_seg(struct x86_emulate_ctxt *ctxt, int base_reg) in adjust_modrm_seg()
1116 static int decode_modrm(struct x86_emulate_ctxt *ctxt, in decode_modrm()
1252 static int decode_abs(struct x86_emulate_ctxt *ctxt, in decode_abs()
1273 static void fetch_bit_operand(struct x86_emulate_ctxt *ctxt) in fetch_bit_operand()
1294 static int read_emulated(struct x86_emulate_ctxt *ctxt, in read_emulated()
1318 static int segmented_read(struct x86_emulate_ctxt *ctxt, in segmented_read()
1332 static int segmented_write(struct x86_emulate_ctxt *ctxt, in segmented_write()
1347 static int segmented_cmpxchg(struct x86_emulate_ctxt *ctxt, in segmented_cmpxchg()
1362 static int pio_in_emulated(struct x86_emulate_ctxt *ctxt, in pio_in_emulated()
1397 static int read_interrupt_descriptor(struct x86_emulate_ctxt *ctxt, in read_interrupt_descriptor()
1413 static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt, in get_descriptor_table_ptr()
1435 static int read_segment_descriptor(struct x86_emulate_ctxt *ctxt, in read_segment_descriptor()
1454 static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt, in write_segment_descriptor()
1472 static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in __load_segment_descriptor()
1623 static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in load_segment_descriptor()
1649 static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op) in writeback()
1689 static int push(struct x86_emulate_ctxt *ctxt, void *data, int bytes) in push()
1700 static int em_push(struct x86_emulate_ctxt *ctxt) in em_push()
1707 static int emulate_pop(struct x86_emulate_ctxt *ctxt, in emulate_pop()
1723 static int em_pop(struct x86_emulate_ctxt *ctxt) in em_pop()
1728 static int emulate_popf(struct x86_emulate_ctxt *ctxt, in emulate_popf()
1768 static int em_popf(struct x86_emulate_ctxt *ctxt) in em_popf()
1776 static int em_enter(struct x86_emulate_ctxt *ctxt) in em_enter()
1798 static int em_leave(struct x86_emulate_ctxt *ctxt) in em_leave()
1805 static int em_push_sreg(struct x86_emulate_ctxt *ctxt) in em_push_sreg()
1814 static int em_pop_sreg(struct x86_emulate_ctxt *ctxt) in em_pop_sreg()
1831 static int em_pusha(struct x86_emulate_ctxt *ctxt) in em_pusha()
1851 static int em_pushf(struct x86_emulate_ctxt *ctxt) in em_pushf()
1857 static int em_popa(struct x86_emulate_ctxt *ctxt) in em_popa()
1876 static int __emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in __emulate_int_real()
1925 int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int_real()
1936 static int emulate_int(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int()
1951 static int emulate_iret_real(struct x86_emulate_ctxt *ctxt) in emulate_iret_real()
2003 static int em_iret(struct x86_emulate_ctxt *ctxt) in em_iret()
2018 static int em_jmp_far(struct x86_emulate_ctxt *ctxt) in em_jmp_far()
2048 static int em_grp45(struct x86_emulate_ctxt *ctxt) in em_grp45()
2076 static int em_cmpxchg8b(struct x86_emulate_ctxt *ctxt) in em_cmpxchg8b()
2097 static int em_ret(struct x86_emulate_ctxt *ctxt) in em_ret()
2109 static int em_ret_far(struct x86_emulate_ctxt *ctxt) in em_ret_far()
2143 static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) in em_ret_far_imm()
2154 static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) in em_cmpxchg()
2175 static int em_lseg(struct x86_emulate_ctxt *ctxt) in em_lseg()
2192 setup_syscalls_segments(struct x86_emulate_ctxt *ctxt, in setup_syscalls_segments()
2218 static bool vendor_intel(struct x86_emulate_ctxt *ctxt) in vendor_intel()
2229 static bool em_syscall_is_enabled(struct x86_emulate_ctxt *ctxt) in em_syscall_is_enabled()
2273 static int em_syscall(struct x86_emulate_ctxt *ctxt) in em_syscall()
2331 static int em_sysenter(struct x86_emulate_ctxt *ctxt) in em_sysenter()
2385 static int em_sysexit(struct x86_emulate_ctxt *ctxt) in em_sysexit()
2442 static bool emulator_bad_iopl(struct x86_emulate_ctxt *ctxt) in emulator_bad_iopl()
2453 static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt, in emulator_io_port_access_allowed()
2486 static bool emulator_io_permited(struct x86_emulate_ctxt *ctxt, in emulator_io_permited()
2501 static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, in save_state_to_tss16()
2522 static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, in load_state_from_tss16()
2579 static int task_switch_16(struct x86_emulate_ctxt *ctxt, in task_switch_16()
2623 static void save_state_to_tss32(struct x86_emulate_ctxt *ctxt, in save_state_to_tss32()
2646 static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt, in load_state_from_tss32()
2729 static int task_switch_32(struct x86_emulate_ctxt *ctxt, in task_switch_32()
2776 static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_do_task_switch()
2879 int emulator_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_task_switch()
2900 static void string_addr_inc(struct x86_emulate_ctxt *ctxt, int reg, in string_addr_inc()
2909 static int em_das(struct x86_emulate_ctxt *ctxt) in em_das()
2947 static int em_aam(struct x86_emulate_ctxt *ctxt) in em_aam()
2969 static int em_aad(struct x86_emulate_ctxt *ctxt) in em_aad()
2987 static int em_call(struct x86_emulate_ctxt *ctxt) in em_call()
2999 static int em_call_far(struct x86_emulate_ctxt *ctxt) in em_call_far()
3039 static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt) in em_ret_near_imm()
3054 static int em_xchg(struct x86_emulate_ctxt *ctxt) in em_xchg()
3066 static int em_imul_3op(struct x86_emulate_ctxt *ctxt) in em_imul_3op()
3072 static int em_cwd(struct x86_emulate_ctxt *ctxt) in em_cwd()
3082 static int em_rdtsc(struct x86_emulate_ctxt *ctxt) in em_rdtsc()
3092 static int em_rdpmc(struct x86_emulate_ctxt *ctxt) in em_rdpmc()
3103 static int em_mov(struct x86_emulate_ctxt *ctxt) in em_mov()
3111 static int em_movbe(struct x86_emulate_ctxt *ctxt) in em_movbe()
3149 static int em_cr_write(struct x86_emulate_ctxt *ctxt) in em_cr_write()
3159 static int em_dr_write(struct x86_emulate_ctxt *ctxt) in em_dr_write()
3177 static int em_wrmsr(struct x86_emulate_ctxt *ctxt) in em_wrmsr()
3189 static int em_rdmsr(struct x86_emulate_ctxt *ctxt) in em_rdmsr()
3201 static int em_mov_rm_sreg(struct x86_emulate_ctxt *ctxt) in em_mov_rm_sreg()
3210 static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt) in em_mov_sreg_rm()
3225 static int em_lldt(struct x86_emulate_ctxt *ctxt) in em_lldt()
3234 static int em_ltr(struct x86_emulate_ctxt *ctxt) in em_ltr()
3243 static int em_invlpg(struct x86_emulate_ctxt *ctxt) in em_invlpg()
3256 static int em_clts(struct x86_emulate_ctxt *ctxt) in em_clts()
3266 static int em_vmcall(struct x86_emulate_ctxt *ctxt) in em_vmcall()
3280 static int emulate_store_desc_ptr(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3281 void (*get)(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3299 static int em_sgdt(struct x86_emulate_ctxt *ctxt) in em_sgdt()
3304 static int em_sidt(struct x86_emulate_ctxt *ctxt) in em_sidt()
3309 static int em_lgdt(struct x86_emulate_ctxt *ctxt) in em_lgdt()
3327 static int em_vmmcall(struct x86_emulate_ctxt *ctxt) in em_vmmcall()
3338 static int em_lidt(struct x86_emulate_ctxt *ctxt) in em_lidt()
3356 static int em_smsw(struct x86_emulate_ctxt *ctxt) in em_smsw()
3364 static int em_lmsw(struct x86_emulate_ctxt *ctxt) in em_lmsw()
3372 static int em_loop(struct x86_emulate_ctxt *ctxt) in em_loop()
3384 static int em_jcxz(struct x86_emulate_ctxt *ctxt) in em_jcxz()
3394 static int em_in(struct x86_emulate_ctxt *ctxt) in em_in()
3403 static int em_out(struct x86_emulate_ctxt *ctxt) in em_out()
3412 static int em_cli(struct x86_emulate_ctxt *ctxt) in em_cli()
3421 static int em_sti(struct x86_emulate_ctxt *ctxt) in em_sti()
3431 static int em_cpuid(struct x86_emulate_ctxt *ctxt) in em_cpuid()
3445 static int em_sahf(struct x86_emulate_ctxt *ctxt) in em_sahf()
3457 static int em_lahf(struct x86_emulate_ctxt *ctxt) in em_lahf()
3464 static int em_bswap(struct x86_emulate_ctxt *ctxt) in em_bswap()
3479 static int em_clflush(struct x86_emulate_ctxt *ctxt) in em_clflush()
3497 static int check_cr_read(struct x86_emulate_ctxt *ctxt) in check_cr_read()
3505 static int check_cr_write(struct x86_emulate_ctxt *ctxt) in check_cr_write()
3566 static int check_dr7_gd(struct x86_emulate_ctxt *ctxt) in check_dr7_gd()
3576 static int check_dr_read(struct x86_emulate_ctxt *ctxt) in check_dr_read()
3594 static int check_dr_write(struct x86_emulate_ctxt *ctxt) in check_dr_write()
3605 static int check_svme(struct x86_emulate_ctxt *ctxt) in check_svme()
3617 static int check_svme_pa(struct x86_emulate_ctxt *ctxt) in check_svme_pa()
3628 static int check_rdtsc(struct x86_emulate_ctxt *ctxt) in check_rdtsc()
3638 static int check_rdpmc(struct x86_emulate_ctxt *ctxt) in check_rdpmc()
3650 static int check_perm_in(struct x86_emulate_ctxt *ctxt) in check_perm_in()
3659 static int check_perm_out(struct x86_emulate_ctxt *ctxt) in check_perm_out()
4164 static unsigned imm_size(struct x86_emulate_ctxt *ctxt) in imm_size()
4174 static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_imm()
4214 static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_operand()
4380 int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len) in x86_decode_insn()
4636 bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt) in x86_page_table_writing_insn()
4641 static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) in string_insn_completed()
4661 static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) in flush_pending_x87_faults()
4683 static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt, in fetch_possible_mmx_operand()
4690 static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) in fastop()
4705 void init_decode_cache(struct x86_emulate_ctxt *ctxt) in init_decode_cache()
4715 int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) in x86_emulate_insn()
5073 void emulator_invalidate_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_invalidate_register_cache()
5078 void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_writeback_register_cache()