aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tools: Don't turn CFLAGS into a := (immediate evaluation) variable asKeir Fraser2009-01-121-1/+1
| | | | | | this breaks 'CFLAGS += -MMD -MF .$(@F).d' Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: read/write/insn_fetch emulation hooks now all take aKeir Fraser2008-06-301-5/+4
| | | | | | | pointer to emulator data buffer, and an arbitrary byte count (up to the size of a page of memory). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Support CMPXCHG16B.Keir Fraser2008-04-221-42/+6
| | | | | | | | Also clean up cmpxchg() callback handling so we can get rid of teh specific cmpxchg8b handler. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Implement a more dynamic interface for handling FPUKeir Fraser2008-04-161-6/+0
| | | | | | exceptions, which will allow emulation stubs to be built dynamically in a future patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86 firmware: Consolidate firmware common build rules.Keir Fraser2008-04-021-4/+4
| | | | | | Also avoid overriding global optimisation default (-O1, -O2, etc.) Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Remove environment-specific definitions from coreKeir Fraser2008-03-313-22/+30
| | | | | emulator source files. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86_emulate: Allow writeback-avoidance optimisation to be defeated byKeir Fraser2008-02-211-0/+1
| | | | | | | | | | 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>
* tools: Avoid -nostdlib argument to $(LD).Keir Fraser2007-11-131-2/+1
| | | | | This interacts badly with GNU ld on Solaris. Signed-off-by: Keir Fraser <keir@xensource.com>
* solaris: Fix Solaris tools build.Keir Fraser2007-11-021-1/+0
| | | | | Signed-off-by: John Levon <john.levon@sun.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Extend emulator return codes.kfraser@localhost.localdomain2007-02-211-24/+24
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Allow stack-address-size to be specified differently fromkfraser@localhost.localdomain2007-01-151-1/+2
| | | | | 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-142-1/+5
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [TESTS] Fix native jump to 1MB absolute address in emulator test.kaf24@localhost.localdomain2007-01-131-1/+1
| | | | | Fix typo in emulator comment. Signed-off-by: Keir Fraser <keir@xensource.com>
* Extend emulator testing.kfraser@localhost.localdomain2007-01-124-5/+512
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [TEST] Fix x86_emulate tests on x86/64 host.kfraser@localhost.localdomain2007-01-091-6/+26
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Emulate DAA/DAS the hard way. We cannot execute the instructionkfraser@localhost.localdomain2007-01-091-2/+65
| | | | | | directly within the emulator as it is unavailable if the emulator runs in x86/64 mode. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Tweak x86 emulator interface.kfraser@localhost.localdomain2007-01-081-1/+1
| | | | 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-16/+43
| | | | | | x86_emulate(), as the emulator now does more than emulation of 'special' memory accesses. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Emulator extensions to decode ModRM.MOD == 3.kfraser@localhost.localdomain2006-12-201-20/+18
| | | | | This allows emulation of register-only instructions. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Add 'insn_fetch' memory operation to the x86_emulator.kaf24@localhost.localdomain2006-12-031-1/+5
| | | | | | | | | 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] Emulate XADD instruction.kfraser@localhost.localdomain2006-12-011-0/+20
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Simplify x86_emulate interface.kfraser@localhost.localdomain2006-11-301-28/+48
| | | | | | | | | | | | | | | | - 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>
* [XEN] Fix the x86 emulator to safely fail when it turns out thekfraser@localhost.localdomain2006-08-231-0/+14
| | | | | | | | 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>
* [X86EMUL] Mark MOV instruction as not needing writeback.kfraser@dhcp93.uk.xensource.com2006-06-061-39/+64
| | | | | | | Fix the test harness for x86/64 -- map emulated addresses to low 4GB of address space. 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-30/+37
| | | | | | | | | | 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>
* Remove __TEST_HARNESS__ tests from x86_emulate: instead check for __XEN__kaf24@firebug.cl.cam.ac.uk2006-05-181-2/+0
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* build: Clean up use of .PHONYkaf24@firebug.cl.cam.ac.uk2006-04-101-0/+3
| | | | | | | | | | | | * 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>
* Fix tools Makefiles to respect CFLAGS. Disable stack-smashkaf24@firebug.cl.cam.ac.uk2006-02-281-5/+4
| | | | | | | | protection when building vmxassist/hvmloader. 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/+12
| | | | | | | | the X86EMUL_MODE enumeration. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add support for MOVSX/MOVSXD/MOVZX (move-with-extend)kaf24@firebug.cl.cam.ac.uk2005-12-212-0/+32
| | | | | | | | | | | | 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>
* Fix tools to pull public header files from standardkaf24@firebug.cl.cam.ac.uk2005-10-041-1/+1
| | | | | | | | | | 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>
* bitkeeper revision 1.1236.1.114 (42407a31Nf9p7AkNdYSNJUqcXa7-NA)kaf24@firebug.cl.cam.ac.uk2005-03-221-2/+35
| | | | | | Fix XCHG instruction emulation. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.101 (423f0cb4e4UtnlbkQsaMhXYz4hi__w)kaf24@firebug.cl.cam.ac.uk2005-03-211-2/+50
| | | | | | Add CMPXCHG8B support to the instruction emulator. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.85 (423af065m4e0j4eXiTFvV-BrIlfC-A)kaf24@firebug.cl.cam.ac.uk2005-03-181-0/+15
| | | | | | | | 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>
* bitkeeper revision 1.1236.34.3 (4237063cE2rat5RdEGCsTzuaC6XCcA)kaf24@firebug.cl.cam.ac.uk2005-03-151-5/+3
| | | | | | | | | | | 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-092-0/+190
Begin integrating new instruction decoder and emulator. Signed-off-by: Keir Fraser <keir@xensource.com>