Lines Matching defs:ctxt
264 static ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_read()
273 static ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_write()
280 static ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_rmw()
286 static void writeback_registers(struct x86_emulate_ctxt *ctxt) in writeback_registers()
294 static void invalidate_registers(struct x86_emulate_ctxt *ctxt) in invalidate_registers()
460 static int emulator_check_intercept(struct x86_emulate_ctxt *ctxt, in emulator_check_intercept()
505 static inline unsigned long ad_mask(struct x86_emulate_ctxt *ctxt) in ad_mask()
510 static ulong stack_mask(struct x86_emulate_ctxt *ctxt) in stack_mask()
521 static int stack_size(struct x86_emulate_ctxt *ctxt) in stack_size()
528 address_mask(struct x86_emulate_ctxt *ctxt, unsigned long reg) in address_mask()
537 register_address(struct x86_emulate_ctxt *ctxt, int reg) in register_address()
548 register_address_increment(struct x86_emulate_ctxt *ctxt, int reg, int inc) in register_address_increment()
555 static void rsp_increment(struct x86_emulate_ctxt *ctxt, int inc) in rsp_increment()
567 static unsigned long seg_base(struct x86_emulate_ctxt *ctxt, int seg) in seg_base()
575 static int emulate_exception(struct x86_emulate_ctxt *ctxt, int vec, in emulate_exception()
585 static int emulate_db(struct x86_emulate_ctxt *ctxt) in emulate_db()
590 static int emulate_gp(struct x86_emulate_ctxt *ctxt, int err) in emulate_gp()
595 static int emulate_ss(struct x86_emulate_ctxt *ctxt, int err) in emulate_ss()
600 static int emulate_ud(struct x86_emulate_ctxt *ctxt) in emulate_ud()
605 static int emulate_ts(struct x86_emulate_ctxt *ctxt, int err) in emulate_ts()
610 static int emulate_de(struct x86_emulate_ctxt *ctxt) in emulate_de()
615 static int emulate_nm(struct x86_emulate_ctxt *ctxt) in emulate_nm()
620 static u16 get_segment_selector(struct x86_emulate_ctxt *ctxt, unsigned seg) in get_segment_selector()
629 static void set_segment_selector(struct x86_emulate_ctxt *ctxt, u16 selector, in set_segment_selector()
649 static unsigned insn_alignment(struct x86_emulate_ctxt *ctxt, unsigned size) in insn_alignment()
666 static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, in __linearize()
731 static int linearize(struct x86_emulate_ctxt *ctxt, in linearize()
741 static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst, in assign_eip()
758 static inline int assign_eip_near(struct x86_emulate_ctxt *ctxt, ulong dst) in assign_eip_near()
763 static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst, in assign_eip_far()
789 static inline int jmp_rel(struct x86_emulate_ctxt *ctxt, int rel) in jmp_rel()
794 static int linear_read_system(struct x86_emulate_ctxt *ctxt, ulong linear, in linear_read_system()
800 static int linear_write_system(struct x86_emulate_ctxt *ctxt, in linear_write_system()
807 static int segmented_read_std(struct x86_emulate_ctxt *ctxt, in segmented_read_std()
821 static int segmented_write_std(struct x86_emulate_ctxt *ctxt, in segmented_write_std()
839 static int __do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, int op_size) in __do_insn_fetch_bytes()
883 static __always_inline int do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, in do_insn_fetch_bytes()
922 static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg, in decode_register()
935 static int read_descriptor(struct x86_emulate_ctxt *ctxt, in read_descriptor()
996 static int em_bsf_c(struct x86_emulate_ctxt *ctxt) in em_bsf_c()
1004 static int em_bsr_c(struct x86_emulate_ctxt *ctxt) in em_bsr_c()
1041 static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg) in read_sse_reg()
1068 static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, in write_sse_reg()
1096 static void read_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) in read_mmx_reg()
1113 static void write_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) in write_mmx_reg()
1130 static int em_fninit(struct x86_emulate_ctxt *ctxt) in em_fninit()
1141 static int em_fnstcw(struct x86_emulate_ctxt *ctxt) in em_fnstcw()
1157 static int em_fnstsw(struct x86_emulate_ctxt *ctxt) in em_fnstsw()
1173 static void decode_register_operand(struct x86_emulate_ctxt *ctxt, in decode_register_operand()
1204 static void adjust_modrm_seg(struct x86_emulate_ctxt *ctxt, int base_reg) in adjust_modrm_seg()
1210 static int decode_modrm(struct x86_emulate_ctxt *ctxt, in decode_modrm()
1347 static int decode_abs(struct x86_emulate_ctxt *ctxt, in decode_abs()
1368 static void fetch_bit_operand(struct x86_emulate_ctxt *ctxt) in fetch_bit_operand()
1390 static int read_emulated(struct x86_emulate_ctxt *ctxt, in read_emulated()
1414 static int segmented_read(struct x86_emulate_ctxt *ctxt, in segmented_read()
1428 static int segmented_write(struct x86_emulate_ctxt *ctxt, in segmented_write()
1443 static int segmented_cmpxchg(struct x86_emulate_ctxt *ctxt, in segmented_cmpxchg()
1458 static int pio_in_emulated(struct x86_emulate_ctxt *ctxt, in pio_in_emulated()
1493 static int read_interrupt_descriptor(struct x86_emulate_ctxt *ctxt, in read_interrupt_descriptor()
1508 static void get_descriptor_table_ptr(struct x86_emulate_ctxt *ctxt, in get_descriptor_table_ptr()
1529 static int get_descriptor_ptr(struct x86_emulate_ctxt *ctxt, in get_descriptor_ptr()
1558 static int read_segment_descriptor(struct x86_emulate_ctxt *ctxt, in read_segment_descriptor()
1572 static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt, in write_segment_descriptor()
1585 static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in __load_segment_descriptor()
1759 static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, in load_segment_descriptor()
1787 static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op) in writeback()
1827 static int push(struct x86_emulate_ctxt *ctxt, void *data, int bytes) in push()
1838 static int em_push(struct x86_emulate_ctxt *ctxt) in em_push()
1845 static int emulate_pop(struct x86_emulate_ctxt *ctxt, in emulate_pop()
1861 static int em_pop(struct x86_emulate_ctxt *ctxt) in em_pop()
1866 static int emulate_popf(struct x86_emulate_ctxt *ctxt, in emulate_popf()
1908 static int em_popf(struct x86_emulate_ctxt *ctxt) in em_popf()
1916 static int em_enter(struct x86_emulate_ctxt *ctxt) in em_enter()
1938 static int em_leave(struct x86_emulate_ctxt *ctxt) in em_leave()
1945 static int em_push_sreg(struct x86_emulate_ctxt *ctxt) in em_push_sreg()
1958 static int em_pop_sreg(struct x86_emulate_ctxt *ctxt) in em_pop_sreg()
1977 static int em_pusha(struct x86_emulate_ctxt *ctxt) in em_pusha()
1997 static int em_pushf(struct x86_emulate_ctxt *ctxt) in em_pushf()
2003 static int em_popa(struct x86_emulate_ctxt *ctxt) in em_popa()
2024 static int __emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in __emulate_int_real()
2073 int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int_real()
2084 static int emulate_int(struct x86_emulate_ctxt *ctxt, int irq) in emulate_int()
2099 static int emulate_iret_real(struct x86_emulate_ctxt *ctxt) in emulate_iret_real()
2155 static int em_iret(struct x86_emulate_ctxt *ctxt) in em_iret()
2170 static int em_jmp_far(struct x86_emulate_ctxt *ctxt) in em_jmp_far()
2193 static int em_jmp_abs(struct x86_emulate_ctxt *ctxt) in em_jmp_abs()
2198 static int em_call_near_abs(struct x86_emulate_ctxt *ctxt) in em_call_near_abs()
2212 static int em_cmpxchg8b(struct x86_emulate_ctxt *ctxt) in em_cmpxchg8b()
2233 static int em_ret(struct x86_emulate_ctxt *ctxt) in em_ret()
2245 static int em_ret_far(struct x86_emulate_ctxt *ctxt) in em_ret_far()
2274 static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) in em_ret_far_imm()
2285 static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) in em_cmpxchg()
2309 static int em_lseg(struct x86_emulate_ctxt *ctxt) in em_lseg()
2325 static int emulator_has_longmode(struct x86_emulate_ctxt *ctxt) in emulator_has_longmode()
2357 static int rsm_load_seg_32(struct x86_emulate_ctxt *ctxt, u64 smbase, int n) in rsm_load_seg_32()
2377 static int rsm_load_seg_64(struct x86_emulate_ctxt *ctxt, u64 smbase, int n) in rsm_load_seg_64()
2396 static int rsm_enter_protected_mode(struct x86_emulate_ctxt *ctxt, in rsm_enter_protected_mode()
2441 static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase) in rsm_load_state_32()
2495 static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase) in rsm_load_state_64()
2557 static int em_rsm(struct x86_emulate_ctxt *ctxt) in em_rsm()
2622 setup_syscalls_segments(struct x86_emulate_ctxt *ctxt, in setup_syscalls_segments()
2648 static bool vendor_intel(struct x86_emulate_ctxt *ctxt) in vendor_intel()
2659 static bool em_syscall_is_enabled(struct x86_emulate_ctxt *ctxt) in em_syscall_is_enabled()
2703 static int em_syscall(struct x86_emulate_ctxt *ctxt) in em_syscall()
2763 static int em_sysenter(struct x86_emulate_ctxt *ctxt) in em_sysenter()
2815 static int em_sysexit(struct x86_emulate_ctxt *ctxt) in em_sysexit()
2874 static bool emulator_bad_iopl(struct x86_emulate_ctxt *ctxt) in emulator_bad_iopl()
2885 static bool emulator_io_port_access_allowed(struct x86_emulate_ctxt *ctxt, in emulator_io_port_access_allowed()
2918 static bool emulator_io_permited(struct x86_emulate_ctxt *ctxt, in emulator_io_permited()
2933 static void string_registers_quirk(struct x86_emulate_ctxt *ctxt) in string_registers_quirk()
2957 static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, in save_state_to_tss16()
2978 static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, in load_state_from_tss16()
3035 static int task_switch_16(struct x86_emulate_ctxt *ctxt, in task_switch_16()
3070 static void save_state_to_tss32(struct x86_emulate_ctxt *ctxt, in save_state_to_tss32()
3093 static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt, in load_state_from_tss32()
3174 static int task_switch_32(struct x86_emulate_ctxt *ctxt, in task_switch_32()
3213 static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_do_task_switch()
3315 int emulator_task_switch(struct x86_emulate_ctxt *ctxt, in emulator_task_switch()
3336 static void string_addr_inc(struct x86_emulate_ctxt *ctxt, int reg, in string_addr_inc()
3345 static int em_das(struct x86_emulate_ctxt *ctxt) in em_das()
3383 static int em_aam(struct x86_emulate_ctxt *ctxt) in em_aam()
3405 static int em_aad(struct x86_emulate_ctxt *ctxt) in em_aad()
3423 static int em_call(struct x86_emulate_ctxt *ctxt) in em_call()
3435 static int em_call_far(struct x86_emulate_ctxt *ctxt) in em_call_far()
3479 static int em_ret_near_imm(struct x86_emulate_ctxt *ctxt) in em_ret_near_imm()
3494 static int em_xchg(struct x86_emulate_ctxt *ctxt) in em_xchg()
3506 static int em_imul_3op(struct x86_emulate_ctxt *ctxt) in em_imul_3op()
3512 static int em_cwd(struct x86_emulate_ctxt *ctxt) in em_cwd()
3522 static int em_rdpid(struct x86_emulate_ctxt *ctxt) in em_rdpid()
3532 static int em_rdtsc(struct x86_emulate_ctxt *ctxt) in em_rdtsc()
3542 static int em_rdpmc(struct x86_emulate_ctxt *ctxt) in em_rdpmc()
3553 static int em_mov(struct x86_emulate_ctxt *ctxt) in em_mov()
3561 static int em_movbe(struct x86_emulate_ctxt *ctxt) in em_movbe()
3599 static int em_cr_write(struct x86_emulate_ctxt *ctxt) in em_cr_write()
3609 static int em_dr_write(struct x86_emulate_ctxt *ctxt) in em_dr_write()
3627 static int em_wrmsr(struct x86_emulate_ctxt *ctxt) in em_wrmsr()
3639 static int em_rdmsr(struct x86_emulate_ctxt *ctxt) in em_rdmsr()
3651 static int em_mov_rm_sreg(struct x86_emulate_ctxt *ctxt) in em_mov_rm_sreg()
3662 static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt) in em_mov_sreg_rm()
3677 static int em_lldt(struct x86_emulate_ctxt *ctxt) in em_lldt()
3686 static int em_ltr(struct x86_emulate_ctxt *ctxt) in em_ltr()
3695 static int em_invlpg(struct x86_emulate_ctxt *ctxt) in em_invlpg()
3708 static int em_clts(struct x86_emulate_ctxt *ctxt) in em_clts()
3718 static int em_hypercall(struct x86_emulate_ctxt *ctxt) in em_hypercall()
3732 static int emulate_store_desc_ptr(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3733 void (*get)(struct x86_emulate_ctxt *ctxt, in emulate_store_desc_ptr()
3751 static int em_sgdt(struct x86_emulate_ctxt *ctxt) in em_sgdt()
3756 static int em_sidt(struct x86_emulate_ctxt *ctxt) in em_sidt()
3761 static int em_lgdt_lidt(struct x86_emulate_ctxt *ctxt, bool lgdt) in em_lgdt_lidt()
3785 static int em_lgdt(struct x86_emulate_ctxt *ctxt) in em_lgdt()
3790 static int em_lidt(struct x86_emulate_ctxt *ctxt) in em_lidt()
3795 static int em_smsw(struct x86_emulate_ctxt *ctxt) in em_smsw()
3803 static int em_lmsw(struct x86_emulate_ctxt *ctxt) in em_lmsw()
3811 static int em_loop(struct x86_emulate_ctxt *ctxt) in em_loop()
3823 static int em_jcxz(struct x86_emulate_ctxt *ctxt) in em_jcxz()
3833 static int em_in(struct x86_emulate_ctxt *ctxt) in em_in()
3842 static int em_out(struct x86_emulate_ctxt *ctxt) in em_out()
3851 static int em_cli(struct x86_emulate_ctxt *ctxt) in em_cli()
3860 static int em_sti(struct x86_emulate_ctxt *ctxt) in em_sti()
3870 static int em_cpuid(struct x86_emulate_ctxt *ctxt) in em_cpuid()
3884 static int em_sahf(struct x86_emulate_ctxt *ctxt) in em_sahf()
3897 static int em_lahf(struct x86_emulate_ctxt *ctxt) in em_lahf()
3904 static int em_bswap(struct x86_emulate_ctxt *ctxt) in em_bswap()
3919 static int em_clflush(struct x86_emulate_ctxt *ctxt) in em_clflush()
3925 static int em_clflushopt(struct x86_emulate_ctxt *ctxt) in em_clflushopt()
3931 static int em_movsxd(struct x86_emulate_ctxt *ctxt) in em_movsxd()
3937 static int check_fxsr(struct x86_emulate_ctxt *ctxt) in check_fxsr()
3976 static int em_fxsave(struct x86_emulate_ctxt *ctxt) in em_fxsave()
4003 static int fxrstor_fixup(struct x86_emulate_ctxt *ctxt, in fxrstor_fixup()
4033 static int em_fxrstor(struct x86_emulate_ctxt *ctxt) in em_fxrstor()
4074 static int check_cr_read(struct x86_emulate_ctxt *ctxt) in check_cr_read()
4082 static int check_cr_write(struct x86_emulate_ctxt *ctxt) in check_cr_write()
4143 static int check_dr7_gd(struct x86_emulate_ctxt *ctxt) in check_dr7_gd()
4153 static int check_dr_read(struct x86_emulate_ctxt *ctxt) in check_dr_read()
4178 static int check_dr_write(struct x86_emulate_ctxt *ctxt) in check_dr_write()
4189 static int check_svme(struct x86_emulate_ctxt *ctxt) in check_svme()
4201 static int check_svme_pa(struct x86_emulate_ctxt *ctxt) in check_svme_pa()
4212 static int check_rdtsc(struct x86_emulate_ctxt *ctxt) in check_rdtsc()
4222 static int check_rdpmc(struct x86_emulate_ctxt *ctxt) in check_rdpmc()
4234 static int check_perm_in(struct x86_emulate_ctxt *ctxt) in check_perm_in()
4243 static int check_perm_out(struct x86_emulate_ctxt *ctxt) in check_perm_out()
4786 static unsigned imm_size(struct x86_emulate_ctxt *ctxt) in imm_size()
4796 static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_imm()
4836 static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, in decode_operand()
5002 int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len) in x86_decode_insn()
5298 bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt) in x86_page_table_writing_insn()
5303 static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) in string_insn_completed()
5323 static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) in flush_pending_x87_faults()
5337 static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt, in fetch_possible_mmx_operand()
5344 static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *)) in fastop()
5359 void init_decode_cache(struct x86_emulate_ctxt *ctxt) in init_decode_cache()
5369 int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) in x86_emulate_insn()
5723 void emulator_invalidate_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_invalidate_register_cache()
5728 void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt) in emulator_writeback_register_cache()