Commit Graph
25 Commits
Author SHA1 Message Date
kaf24@localhost.localdomain 6d675a4ad8 [XEN] Emulate MUL/DIV. Tweak test suite build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 12:03:31 +00:00
kaf24@localhost.localdomain ab5c6b8f11 [TESTS] Fix native jump to 1MB absolute address in emulator test.
Fix typo in emulator comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-13 21:36:31 +00:00
kfraser@localhost.localdomain c69ab9d431 Extend emulator testing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 17:16:45 +00:00
kfraser@localhost.localdomain e0fd6020bc [TEST] Fix x86_emulate tests on x86/64 host.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-09 17:11:46 +00:00
kfraser@localhost.localdomain c9d971bec6 [XEN] Emulate DAA/DAS the hard way. We cannot execute the instruction
directly within the emulator as it is unavailable if the emulator runs
in x86/64 mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-09 16:59:52 +00:00
kfraser@localhost.localdomain ddef8e1678 [XEN] Tweak x86 emulator interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-08 18:39:29 +00:00
kfraser@localhost.localdomain 7a0e89cd5b [XEN] Add LEA to the Xen x86 emulator. Rename x86_emulate_memop() to
x86_emulate(), as the emulator now does more than emulation of
'special' memory accesses.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-05 10:55:55 +00:00
kfraser@localhost.localdomain 0a967eccec [XEN] Emulator extensions to decode ModRM.MOD == 3.
This allows emulation of register-only instructions.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-20 15:16:13 +00:00
kaf24@localhost.localdomain df69bc8551 [XEN] Add 'insn_fetch' memory operation to the x86_emulator.
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>
2006-12-03 17:15:48 +00:00
kfraser@localhost.localdomain 2aba25fee2 [XEN] Emulate XADD instruction.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 13:57:46 +00:00
kfraser@localhost.localdomain 4f24c93f2e [XEN] Simplify x86_emulate interface.
- 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>
2006-11-30 10:57:28 +00:00
kfraser@localhost.localdomain 55bfac8dfd [XEN] Fix the x86 emulator to safely fail when it turns out the
faulting memory access was to/from an implicit memory operand
(typically either an instruction fetch or stack access).
Rationalise use of macros for page fault error code flags.
This patch supercedes the fix in changeset 11242.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 18:38:08 +01:00
kfraser@dhcp93.uk.xensource.com d82a7836f6 [X86EMUL] Mark MOV instruction as not needing writeback.
Fix the test harness for x86/64 -- map emulated addresses
to low 4GB of address space.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-06 08:05:13 +01:00
kaf24@firebug.cl.cam.ac.uk ea1205fb4d Change the x86_emulate() interface to pack all context arguments
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>
2006-05-25 15:52:38 +01:00
kaf24@firebug.cl.cam.ac.uk fc87244286 Remove __TEST_HARNESS__ tests from x86_emulate: instead check for __XEN__
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-18 10:43:05 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk dfd53f76ba Fix tools Makefiles to respect CFLAGS. Disable stack-smash
protection when building vmxassist/hvmloader.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-28 11:41:54 +01:00
kaf24@firebug.cl.cam.ac.uk 7d947ac220 Fix up x86 emulator header docs and ensure callers use
the X86EMUL_MODE enumeration.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-05 12:19:12 +01:00
kaf24@firebug.cl.cam.ac.uk c19d7d7430 Add support for MOVSX/MOVSXD/MOVZX (move-with-extend)
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>
2005-12-21 14:29:23 +01:00
kaf24@firebug.cl.cam.ac.uk 1cd0f4f23f Fix tools to pull public header files from standard
location in libxc directory. Not direct from xen and
xenlinux build trees! Also fix a type name in 
x86_emulator test harness.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:02:18 +01:00
kaf24@firebug.cl.cam.ac.uk 02d0c9fb14 bitkeeper revision 1.1236.1.114 (42407a31Nf9p7AkNdYSNJUqcXa7-NA)
Fix XCHG instruction emulation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-22 20:04:01 +00:00
kaf24@firebug.cl.cam.ac.uk 1abc0a00ce bitkeeper revision 1.1236.1.101 (423f0cb4e4UtnlbkQsaMhXYz4hi__w)
Add CMPXCHG8B support to the instruction emulator.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-21 18:04:36 +00:00
kaf24@firebug.cl.cam.ac.uk befe25d2ca bitkeeper revision 1.1236.1.85 (423af065m4e0j4eXiTFvV-BrIlfC-A)
Linux 2.6 now always uses writable page tables (even SMP builds). Also
use native definitions for atomic read-modify-write operations on
ptes. Fixed instruction emulator in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-18 15:14:45 +00:00
kaf24@firebug.cl.cam.ac.uk d430aae25c bitkeeper revision 1.1236.34.3 (4237063cE2rat5RdEGCsTzuaC6XCcA)
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>
2005-03-15 15:58:52 +00:00
kaf24@firebug.cl.cam.ac.uk 4c5eeec983 bitkeeper revision 1.1236.18.1 (422f27c9EveZXnXhkLBg8iYwaAffoQ)
Begin integrating new instruction decoder and emulator.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-03-09 16:43:53 +00:00