Lines Matching refs:x86_emulate_ctxt
198 int (*execute)(struct x86_emulate_ctxt *ctxt);
207 int (*check_perm)(struct x86_emulate_ctxt *ctxt);
246 static void writeback_registers(struct x86_emulate_ctxt *ctxt) in writeback_registers()
255 static void invalidate_registers(struct x86_emulate_ctxt *ctxt) in invalidate_registers()
291 static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop);
466 static int emulator_check_intercept(struct x86_emulate_ctxt *ctxt, in emulator_check_intercept()
511 static inline unsigned long ad_mask(struct x86_emulate_ctxt *ctxt) in ad_mask()
516 static ulong stack_mask(struct x86_emulate_ctxt *ctxt) in stack_mask()
527 static int stack_size(struct x86_emulate_ctxt *ctxt) in stack_size()
534 address_mask(struct x86_emulate_ctxt *ctxt, unsigned long reg) in address_mask()
543 register_address(struct x86_emulate_ctxt *ctxt, int reg) in register_address()
554 register_address_increment(struct x86_emulate_ctxt *ctxt, int reg, int inc) in register_address_increment()
561 static void rsp_increment(struct x86_emulate_ctxt *ctxt, int inc) in rsp_increment()
573 static unsigned long seg_base(struct x86_emulate_ctxt *ctxt, int seg) in seg_base()
581 static int emulate_exception(struct x86_emulate_ctxt *ctxt, int vec, in emulate_exception()
593 static int emulate_db(struct x86_emulate_ctxt *ctxt) in emulate_db()
598 static int emulate_gp(struct x86_emulate_ctxt *ctxt, int err) in emulate_gp()
603 static int emulate_ss(struct x86_emulate_ctxt *ctxt, int err) in emulate_ss()
608 static int emulate_ud(struct x86_emulate_ctxt *ctxt) in emulate_ud()
613 static int emulate_ts(struct x86_emulate_ctxt *ctxt, int err) in emulate_ts()
618 static int emulate_de(struct x86_emulate_ctxt *ctxt) in emulate_de()
623 static int emulate_nm(struct x86_emulate_ctxt *ctxt) in emulate_nm()
628 static u16 get_segment_selector(struct x86_emulate_ctxt *ctxt, unsigned seg) in get_segment_selector()
637 static void set_segment_selector(struct x86_emulate_ctxt *ctxt, u16 selector, in set_segment_selector()
648 static inline u8 ctxt_virt_addr_bits(struct x86_emulate_ctxt *ctxt) in ctxt_virt_addr_bits()
654 struct x86_emulate_ctxt *ctxt) in emul_is_noncanonical_address()
668 static unsigned insn_alignment(struct x86_emulate_ctxt *ctxt, unsigned size) in insn_alignment()
687 static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, in __linearize()
754 static int linearize(struct x86_emulate_ctxt *ctxt, in linearize()
764 static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst) in assign_eip()
781 static inline int emulator_recalc_and_set_mode(struct x86_emulate_ctxt *ctxt) in emulator_recalc_and_set_mode()
827 static inline int assign_eip_near(struct x86_emulate_ctxt *ctxt, ulong dst) in assign_eip_near()
832 static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst) in assign_eip_far()
842 static inline int jmp_rel(struct x86_emulate_ctxt *ctxt, int rel) in jmp_rel()
847 static int linear_read_system(struct x86_emulate_ctxt *ctxt, ulong linear, in linear_read_system()
853 static int linear_write_system(struct x86_emulate_ctxt *ctxt, in linear_write_system()
860 static int segmented_read_std(struct x86_emulate_ctxt *ctxt, in segmented_read_std()
874 static int segmented_write_std(struct x86_emulate_ctxt *ctxt, in segmented_write_std()
892 static int __do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, int op_size) in __do_insn_fetch_bytes()
936 static __always_inline int do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, in do_insn_fetch_bytes()
975 static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg, in decode_register()
988 static int read_descriptor(struct x86_emulate_ctxt *ctxt, in read_descriptor()
1049 static int em_bsf_c(struct x86_emulate_ctxt *ctxt) in em_bsf_c()
1057 static int em_bsr_c(struct x86_emulate_ctxt *ctxt) in em_bsr_c()
1094 static int em_fninit(struct x86_emulate_ctxt *ctxt) in em_fninit()
1105 static int em_fnstcw(struct x86_emulate_ctxt *ctxt) in em_fnstcw()
1121 static int em_fnstsw(struct x86_emulate_ctxt *ctxt) in em_fnstsw()
1137 static void decode_register_operand(struct x86_emulate_ctxt *ctxt, in decode_register_operand()
1170 static void adjust_modrm_seg(struct x86_emulate_ctxt *ctxt, int base_reg) in adjust_modrm_seg()
1176 static int decode_modrm(struct x86_emulate_ctxt *ctxt, in decode_modrm()
1313 static int decode_abs(struct x86_emulate_ctxt *ctxt, in decode_abs()
1334 static void fetch_bit_operand(struct x86_emulate_ctxt *ctxt) in fetch_bit_operand()
1356 static int read_emulated(struct x86_emulate_ctxt *ctxt, in read_emulated()
1381 static int segmented_read(struct x86_emulate_ctxt *ctxt, in segmented_read()
1395 static int segmented_write(struct x86_emulate_ctxt *ctxt, in segmented_write()
1410 static int segmented_cmpxchg(struct x86_emulate_ctxt *ctxt, in segmented_cmpxchg()
1425 static int pio_in_emulated(struct x86_emulate_ctxt *ctxt, in pio_in_emulated()
1460 static int read_interrupt_descriptor(struct x86_emulate_ctxt *ctxt, in read_interrupt_descriptor()
1475 static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt, in get_descriptor_table_ptr()
1496 static int get_descriptor_ptr(struct x86_emulate_ctxt *ctxt, in get_descriptor_ptr()
1525 static int read_segment_descriptor(struct x86_emulate_ctxt *ctxt, in read_segment_descriptor()
1539 static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt, in write_segment_descriptor()
1552 static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in __load_segment_descriptor()
1757 static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in load_segment_descriptor()
1785 static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op) in writeback()
1823 static int emulate_push(struct x86_emulate_ctxt *ctxt, const void *data, int len) in emulate_push()
1834 static int em_push(struct x86_emulate_ctxt *ctxt) in em_push()
1841 static int emulate_pop(struct x86_emulate_ctxt *ctxt, in emulate_pop()
1857 static int em_pop(struct x86_emulate_ctxt *ctxt) in em_pop()
1862 static int emulate_popf(struct x86_emulate_ctxt *ctxt, in emulate_popf()
1905 static int em_popf(struct x86_emulate_ctxt *ctxt) in em_popf()
1913 static int em_enter(struct x86_emulate_ctxt *ctxt) in em_enter()
1935 static int em_leave(struct x86_emulate_ctxt *ctxt) in em_leave()
1942 static int em_push_sreg(struct x86_emulate_ctxt *ctxt) in em_push_sreg()
1955 static int em_pop_sreg(struct x86_emulate_ctxt *ctxt) in em_pop_sreg()
1974 static int em_pusha(struct x86_emulate_ctxt *ctxt) in em_pusha()
1994 static int em_pushf(struct x86_emulate_ctxt *ctxt) in em_pushf()
2000 static int em_popa(struct x86_emulate_ctxt *ctxt) in em_popa()
2021 static int __emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in __emulate_int_real()
2070 int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int_real()
2081 static int emulate_int(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int()
2096 static int emulate_iret_real(struct x86_emulate_ctxt *ctxt) in emulate_iret_real()
2152 static int em_iret(struct x86_emulate_ctxt *ctxt) in em_iret()
2167 static int em_jmp_far(struct x86_emulate_ctxt *ctxt) in em_jmp_far()
2190 static int em_jmp_abs(struct x86_emulate_ctxt *ctxt) in em_jmp_abs()
2195 static int em_call_near_abs(struct x86_emulate_ctxt *ctxt) in em_call_near_abs()
2209 static int em_cmpxchg8b(struct x86_emulate_ctxt *ctxt) in em_cmpxchg8b()
2230 static int em_ret(struct x86_emulate_ctxt *ctxt) in em_ret()
2242 static int em_ret_far(struct x86_emulate_ctxt *ctxt) in em_ret_far()
2269 static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) in em_ret_far_imm()
2280 static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) in em_cmpxchg()
2304 static int em_lseg(struct x86_emulate_ctxt *ctxt) in em_lseg()
2320 static int em_rsm(struct x86_emulate_ctxt *ctxt) in em_rsm()
2357 static int em_syscall(struct x86_emulate_ctxt *ctxt) in em_syscall()
2424 static int em_sysenter(struct x86_emulate_ctxt *ctxt) in em_sysenter()
2477 static int em_sysexit(struct x86_emulate_ctxt *ctxt) in em_sysexit()
2537 static bool emulator_bad_iopl(struct x86_emulate_ctxt *ctxt) in emulator_bad_iopl()
2551 static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt, in emulator_io_port_access_allowed()
2592 static bool emulator_io_permitted(struct x86_emulate_ctxt *ctxt, in emulator_io_permitted()
2607 static void string_registers_quirk(struct x86_emulate_ctxt *ctxt) in string_registers_quirk()
2638 static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, in save_state_to_tss16()
2659 static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, in load_state_from_tss16()
2716 static int task_switch_16(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel, in task_switch_16()
2750 static void save_state_to_tss32(struct x86_emulate_ctxt *ctxt, in save_state_to_tss32()
2773 static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt, in load_state_from_tss32()
2854 static int task_switch_32(struct x86_emulate_ctxt *ctxt, u16 old_tss_sel, in task_switch_32()
2892 static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_do_task_switch()
2993 int emulator_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_task_switch()
3014 static void string_addr_inc(struct x86_emulate_ctxt *ctxt, int reg, in string_addr_inc()
3023 static int em_das(struct x86_emulate_ctxt *ctxt) in em_das()
3061 static int em_aam(struct x86_emulate_ctxt *ctxt) in em_aam()
3083 static int em_aad(struct x86_emulate_ctxt *ctxt) in em_aad()
3101 static int em_call(struct x86_emulate_ctxt *ctxt) in em_call()
3113 static int em_call_far(struct x86_emulate_ctxt *ctxt) in em_call_far()
3157 static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt) in em_ret_near_imm()
3172 static int em_xchg(struct x86_emulate_ctxt *ctxt) in em_xchg()
3184 static int em_imul_3op(struct x86_emulate_ctxt *ctxt) in em_imul_3op()
3190 static int em_cwd(struct x86_emulate_ctxt *ctxt) in em_cwd()
3200 static int em_rdpid(struct x86_emulate_ctxt *ctxt) in em_rdpid()
3212 static int em_rdtsc(struct x86_emulate_ctxt *ctxt) in em_rdtsc()
3222 static int em_rdpmc(struct x86_emulate_ctxt *ctxt) in em_rdpmc()
3233 static int em_mov(struct x86_emulate_ctxt *ctxt) in em_mov()
3239 static int em_movbe(struct x86_emulate_ctxt *ctxt) in em_movbe()
3272 static int em_cr_write(struct x86_emulate_ctxt *ctxt) in em_cr_write()
3296 static int em_dr_write(struct x86_emulate_ctxt *ctxt) in em_dr_write()
3314 static int em_wrmsr(struct x86_emulate_ctxt *ctxt) in em_wrmsr()
3330 static int em_rdmsr(struct x86_emulate_ctxt *ctxt) in em_rdmsr()
3348 static int em_store_sreg(struct x86_emulate_ctxt *ctxt, int segment) in em_store_sreg()
3361 static int em_mov_rm_sreg(struct x86_emulate_ctxt *ctxt) in em_mov_rm_sreg()
3369 static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt) in em_mov_sreg_rm()
3384 static int em_sldt(struct x86_emulate_ctxt *ctxt) in em_sldt()
3389 static int em_lldt(struct x86_emulate_ctxt *ctxt) in em_lldt()
3398 static int em_str(struct x86_emulate_ctxt *ctxt) in em_str()
3403 static int em_ltr(struct x86_emulate_ctxt *ctxt) in em_ltr()
3412 static int em_invlpg(struct x86_emulate_ctxt *ctxt) in em_invlpg()
3427 static int em_clts(struct x86_emulate_ctxt *ctxt) in em_clts()
3437 static int em_hypercall(struct x86_emulate_ctxt *ctxt) in em_hypercall()
3451 static int emulate_store_desc_ptr(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3452 void (*get)(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3474 static int em_sgdt(struct x86_emulate_ctxt *ctxt) in em_sgdt()
3479 static int em_sidt(struct x86_emulate_ctxt *ctxt) in em_sidt()
3484 static int em_lgdt_lidt(struct x86_emulate_ctxt *ctxt, bool lgdt) in em_lgdt_lidt()
3508 static int em_lgdt(struct x86_emulate_ctxt *ctxt) in em_lgdt()
3513 static int em_lidt(struct x86_emulate_ctxt *ctxt) in em_lidt()
3518 static int em_smsw(struct x86_emulate_ctxt *ctxt) in em_smsw()
3530 static int em_lmsw(struct x86_emulate_ctxt *ctxt) in em_lmsw()
3538 static int em_loop(struct x86_emulate_ctxt *ctxt) in em_loop()
3550 static int em_jcxz(struct x86_emulate_ctxt *ctxt) in em_jcxz()
3560 static int em_in(struct x86_emulate_ctxt *ctxt) in em_in()
3569 static int em_out(struct x86_emulate_ctxt *ctxt) in em_out()
3578 static int em_cli(struct x86_emulate_ctxt *ctxt) in em_cli()
3587 static int em_sti(struct x86_emulate_ctxt *ctxt) in em_sti()
3597 static int em_cpuid(struct x86_emulate_ctxt *ctxt) in em_cpuid()
3618 static int em_sahf(struct x86_emulate_ctxt *ctxt) in em_sahf()
3631 static int em_lahf(struct x86_emulate_ctxt *ctxt) in em_lahf()
3638 static int em_bswap(struct x86_emulate_ctxt *ctxt) in em_bswap()
3653 static int em_clflush(struct x86_emulate_ctxt *ctxt) in em_clflush()
3659 static int em_clflushopt(struct x86_emulate_ctxt *ctxt) in em_clflushopt()
3665 static int em_movsxd(struct x86_emulate_ctxt *ctxt) in em_movsxd()
3671 static int check_fxsr(struct x86_emulate_ctxt *ctxt) in check_fxsr()
3698 static inline size_t fxstate_size(struct x86_emulate_ctxt *ctxt) in fxstate_size()
3726 static int em_fxsave(struct x86_emulate_ctxt *ctxt) in em_fxsave()
3768 static int em_fxrstor(struct x86_emulate_ctxt *ctxt) in em_fxrstor()
3805 static int em_xsetbv(struct x86_emulate_ctxt *ctxt) in em_xsetbv()
3834 static int check_cr_access(struct x86_emulate_ctxt *ctxt) in check_cr_access()
3842 static int check_dr_read(struct x86_emulate_ctxt *ctxt) in check_dr_read()
3867 static int check_dr_write(struct x86_emulate_ctxt *ctxt) in check_dr_write()
3878 static int check_svme(struct x86_emulate_ctxt *ctxt) in check_svme()
3890 static int check_svme_pa(struct x86_emulate_ctxt *ctxt) in check_svme_pa()
3901 static int check_rdtsc(struct x86_emulate_ctxt *ctxt) in check_rdtsc()
3911 static int check_rdpmc(struct x86_emulate_ctxt *ctxt) in check_rdpmc()
3935 static int check_perm_in(struct x86_emulate_ctxt *ctxt) in check_perm_in()
3944 static int check_perm_out(struct x86_emulate_ctxt *ctxt) in check_perm_out()
4511 static unsigned imm_size(struct x86_emulate_ctxt *ctxt) in imm_size()
4521 static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_imm()
4561 static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_operand()
4727 int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len, int emulation_type) in x86_decode_insn()
5026 bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt) in x86_page_table_writing_insn()
5031 static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) in string_insn_completed()
5051 static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) in flush_pending_x87_faults()
5071 static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop) in fastop()
5089 void init_decode_cache(struct x86_emulate_ctxt *ctxt) in init_decode_cache()
5104 int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) in x86_emulate_insn()
5456 void emulator_invalidate_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_invalidate_register_cache()
5461 void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_writeback_register_cache()
5466 bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt) in emulator_can_use_gpa()