aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/x86_emulate.h
Commit message (Collapse)AuthorAgeFilesLines
* Update my email address to long-term stable address.Keir Fraser2011-01-071-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86_emulate: Remove environment-specific definitions from coreKeir Fraser2008-03-311-391/+12
| | | | | emulator source files. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: More emulation changes: push some of the realmode or HVM-emulateKeir Fraser2008-02-221-11/+12
| | | | | specific stuff into core x86_emulate(). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm: Remove lots of custom trap-and-emulate code and defer toKeir Fraser2008-02-211-0/+6
| | | | | handle_mmio()->hvm_emulate_one()->x86_emulate(). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Allow writeback-avoidance optimisation to be defeated byKeir Fraser2008-02-211-12/+15
| | | | | | | | | | the caller. This is used in cases where the writeback may be to an MMIO region with side effects (the APIC EOI register is the main example of this). Also fix up build of the x86_emulate user-space test harness. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* vmx realmode: Emulate protected-mode transition while CS and SS haveKeir Fraser2008-02-051-1/+11
| | | | | | | | | bad selector values (bottom two bits non-zero). Allows opensuse 10.3 install CD to boot. Unfortunately SUSE Linux 10.1 install CD still fails to work... Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Emulate FNINIT, FNSTCW, FNSTSW x87 instructions.Keir Fraser2008-01-231-0/+4
| | | | | | Provide new hook ->load_fpu_ctxt() to ensure emulated environment's FPU state is loaded onto the local processor. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Provide callbacks for faster emulation of:Keir Fraser2008-01-221-0/+43
| | | | | REP MOVS, REP INS, REP OUTS. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Emulate CPUID and HLT.Keir Fraser2007-11-261-0/+12
| | | | | | | vmx realmode: Fix decode & emulate loop, add hooks for CPUID, HLT and WBINVD. Also do not hook realmode entry off of vmentry failure any more. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Allow emulated injection of exceptions and interrupts.Keir Fraser2007-11-251-0/+11
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Support most common segment load/save instructions.Keir Fraser2007-11-241-4/+49
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Extend emulator return codes.kfraser@localhost.localdomain2007-02-211-9/+15
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* emulator: Add new hook functions for load/store privileged state.kfraser@localhost.localdomain2007-01-251-12/+94
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Allow stack-address-size to be specified differently fromkfraser@localhost.localdomain2007-01-151-2/+5
| | | | | regular address-size in the emulator. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Emulate MUL/DIV. Tweak test suite build.kaf24@localhost.localdomain2007-01-141-1/+15
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Tweak x86 emulator interface.kfraser@localhost.localdomain2007-01-081-16/+3
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Add LEA to the Xen x86 emulator. Rename x86_emulate_memop() tokfraser@localhost.localdomain2007-01-051-3/+2
| | | | | | x86_emulate(), as the emulator now does more than emulation of 'special' memory accesses. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Add 'insn_fetch' memory operation to the x86_emulator.kaf24@localhost.localdomain2006-12-031-1/+13
| | | | | | | | | This can be used to perform correct access checks, provide appropriate error codes when injecting faults, and to implement an instruction-stream prefetch cache (which is included here for HVM PTE update emulations). Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Proper segmentation emulation added to HVM emulated PTE writes.kfraser@localhost.localdomain2006-11-301-13/+23
| | | | Sigmed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Simplify x86_emulate interface.kfraser@localhost.localdomain2006-11-301-77/+30
| | | | | | | | | | | | | | | | - No distinction between 'special' and 'normal' memory accesses. - No reliance on caller-supplied %cr2 value - Memory operations include segment identifier to allow callers to support non-zero-based segments TODO: 1. HVM emulations should take into account segment base, limit, and attributes. 2. We ought to obey stack-size attribute on PUSH/POP instructions. Could extend the mode input field, or could add an extra call-out hook, or perhaps we don't care at all... Signed-off-by: Keir Fraser <keir@xensource.com>
* Change the x86_emulate() interface to pack all context argumentskaf24@firebug.cl.cam.ac.uk2006-05-251-22/+38
| | | | | | | | | | into a context structure. This context can then be handed to callback operations. Based on an original patch from Mats Petersson <mats.petersson@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix up x86 emulator header docs and ensure callers usekaf24@firebug.cl.cam.ac.uk2006-01-051-12/+19
| | | | | | | | the X86EMUL_MODE enumeration. Signed-off-by: Keir Fraser <keir@xensource.com>
* Generic x86 emulator now properly supports 16-bit addressingkaf24@firebug.cl.cam.ac.uk2005-12-231-0/+8
| | | | | | | | | | | | | | | | by narrowing accesses to SI/DI/SP registers. Also supports real-mode addressing by shifting and adding the appropriate segment register for certain stack and string operations where the effective address is not already known. todo: Stack operations should have address size specified by B bit in stack segment descriptor, not by default address size or address-size override. Probably nothing depends on the proper behaviour though. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add support for MOVSX/MOVSXD/MOVZX (move-with-extend)kaf24@firebug.cl.cam.ac.uk2005-12-211-1/+1
| | | | | | | | | | | | instructions to the generic x86 emulator. Also add preliminary support for 16-bit addressing: decode the ModR/M byte properly but still need to access and update implicit memory operands (esp,esi,edi) with correct width. Work is also needed to support real-mode addressing. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1389.1.2 (4270ed5dZvr_HdIQR0eBM2m4Kj81_A)kaf24@firebug.cl.cam.ac.uk2005-04-281-3/+3
| | | | | | | | | Renames: execution_context/xen_regs -> cpu_user_regs full_execution_context -> vcpu_guest_context [defined both 'struct xxx' and 'xxx_t' forms] Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.101 (423f0cb4e4UtnlbkQsaMhXYz4hi__w)kaf24@firebug.cl.cam.ac.uk2005-03-211-0/+21
| | | | | | Add CMPXCHG8B support to the instruction emulator. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.34.3 (4237063cE2rat5RdEGCsTzuaC6XCcA)kaf24@firebug.cl.cam.ac.uk2005-03-151-5/+22
| | | | | | | | | | | Tidy the x86 emulator interface, and use it from within the writable pagetable algorithm to deal with otherwise unhandleable cases. For example: L1 mapped at multiple L2 slots; L1 that maps itself; L1 that also maps the code making the update, or the kernel stack. This provides a proof-of-concept for the emulator that can be picked up for the VMX code to improve the device-model emulation. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.18.1 (422f27c9EveZXnXhkLBg8iYwaAffoQ)kaf24@firebug.cl.cam.ac.uk2005-03-091-0/+131
Begin integrating new instruction decoder and emulator. Signed-off-by: Keir Fraser <keir@xensource.com>