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
60 * location, that this location is the given linear faulting address (cr2), and
63 * automatically deduces which operand of a string-move operation is accessing
74 * some out-of-band mechanism, unknown to the emulator. The memop signals
78 * cmpxchg8b_emulated need support 8-byte accesses.
79 * 4. The emulator cannot handle 64-bit mode emulation on an x86/32 system.
94 /* x86-specific emulation flags */
105 * read_gpr: read a general purpose register (rax - r15)
111 * write_gpr: write a general purpose register (rax - r15)
118 * read_std: Read bytes of standard (non-emulated/special) memory.
120 * @addr: [IN ] Linear address from which to read.
121 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
131 * write_std: Write bytes of standard (non-emulated/special) memory.
133 * @addr: [IN ] Linear address to which to write.
134 * @val: [OUT] Value write to memory, zero-extended to 'u_long'.
142 * fetch: Read bytes of standard (non-emulated/special) memory.
144 * @addr: [IN ] Linear address from which to read.
145 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
154 * @addr: [IN ] Linear address from which to read.
155 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
164 * @addr: [IN ] Linear address to which to write.
165 * @val: [IN ] Value to write to memory (low-order bytes used as
177 * @addr: [IN ] Linear address to access.
247 /* Type, address-of, and value of an instruction's operand. */
291 X86EMUL_MODE_PROT16, /* 16-bit protected mode. */
292 X86EMUL_MODE_PROT32, /* 32-bit protected mode. */
293 X86EMUL_MODE_PROT64, /* 64-bit (long) mode. */
297 * fastop functions are declared as taking a never-defined fastop parameter,
391 ctxt->ops->vm_bugged(ctxt); \
445 X86_ICTP_NONE = 0, /* Allow zero-init to not match anything */
514 #define EMULATION_FAILED -1
531 nr &= NR_EMULATOR_GPRS - 1; in reg_read()
533 if (!(ctxt->regs_valid & (1 << nr))) { in reg_read()
534 ctxt->regs_valid |= 1 << nr; in reg_read()
535 ctxt->_regs[nr] = ctxt->ops->read_gpr(ctxt, nr); in reg_read()
537 return ctxt->_regs[nr]; in reg_read()
543 nr &= NR_EMULATOR_GPRS - 1; in reg_write()
545 BUILD_BUG_ON(sizeof(ctxt->regs_dirty) * BITS_PER_BYTE < NR_EMULATOR_GPRS); in reg_write()
546 BUILD_BUG_ON(sizeof(ctxt->regs_valid) * BITS_PER_BYTE < NR_EMULATOR_GPRS); in reg_write()
548 ctxt->regs_valid |= 1 << nr; in reg_write()
549 ctxt->regs_dirty |= 1 << nr; in reg_write()
550 return &ctxt->_regs[nr]; in reg_write()