Lines Matching +full:non +full:- +full:linear
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
9 * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4
63 * location, that this location is the given linear faulting address (cr2), and
66 * automatically deduces which operand of a string-move operation is accessing
77 * some out-of-band mechanism, unknown to the emulator. The memop signals
81 * cmpxchg8b_emulated need support 8-byte accesses.
82 * 4. The emulator cannot handle 64-bit mode emulation on an x86/32 system.
97 /* x86-specific emulation flags */
108 * read_gpr: read a general purpose register (rax - r15)
114 * write_gpr: write a general purpose register (rax - r15)
121 * read_std: Read bytes of standard (non-emulated/special) memory.
123 * @addr: [IN ] Linear address from which to read.
124 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
134 * write_std: Write bytes of standard (non-emulated/special) memory.
136 * @addr: [IN ] Linear address to which to write.
137 * @val: [OUT] Value write to memory, zero-extended to 'u_long'.
145 * fetch: Read bytes of standard (non-emulated/special) memory.
147 * @addr: [IN ] Linear address from which to read.
148 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
157 * @addr: [IN ] Linear address from which to read.
158 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
167 * @addr: [IN ] Linear address to which to write.
168 * @val: [IN ] Value to write to memory (low-order bytes used as
180 * @addr: [IN ] Linear address to access.
250 /* Type, address-of, and value of an instruction's operand. */
296 X86EMUL_MODE_PROT16, /* 16-bit protected mode. */
297 X86EMUL_MODE_PROT32, /* 32-bit protected mode. */
298 X86EMUL_MODE_PROT64, /* 64-bit (long) mode. */
302 * fastop functions are declared as taking a never-defined fastop parameter,
396 ctxt->ops->vm_bugged(ctxt); \
450 X86_ICTP_NONE = 0, /* Allow zero-init to not match anything */
519 #define EMULATION_FAILED -1
536 nr &= NR_EMULATOR_GPRS - 1; in reg_read()
538 if (!(ctxt->regs_valid & (1 << nr))) { in reg_read()
539 ctxt->regs_valid |= 1 << nr; in reg_read()
540 ctxt->_regs[nr] = ctxt->ops->read_gpr(ctxt, nr); in reg_read()
542 return ctxt->_regs[nr]; in reg_read()
548 nr &= NR_EMULATOR_GPRS - 1; in reg_write()
550 BUILD_BUG_ON(sizeof(ctxt->regs_dirty) * BITS_PER_BYTE < NR_EMULATOR_GPRS); in reg_write()
551 BUILD_BUG_ON(sizeof(ctxt->regs_valid) * BITS_PER_BYTE < NR_EMULATOR_GPRS); in reg_write()
553 ctxt->regs_valid |= 1 << nr; in reg_write()
554 ctxt->regs_dirty |= 1 << nr; in reg_write()
555 return &ctxt->_regs[nr]; in reg_write()