Commit Graph
39 Commits
Author SHA1 Message Date
Keir Fraser 00ee63bf97 tools/tests/regression/: Fix some paths and scripts.
o scripts and Makefile are mostly location independent now
  (exception XEN_ROOT in Makefile)
o use of $() instead of ${} in Makefile

From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
2009-08-02 12:22:03 +01:00
Keir Fraser 59efc1880b tools/tests: Add syntax check for different versions of python
From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-28 16:38:08 +01:00
Keir Fraser 6b1ce5497d build: Define cc-option-add to immediately add options to CFLAGS
without deferring the test execution of CC. This avoids extra
executions of CC every time CFLAGS is expanded.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-13 08:59:49 +00:00
Keir Fraser bd3358a451 tools: Don't turn CFLAGS into a := (immediate evaluation) variable as
this breaks 'CFLAGS += -MMD -MF .$(@F).d'

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-01-12 16:39:07 +00:00
Keir Fraser 1be51142f1 x86_emulate: read/write/insn_fetch emulation hooks now all take a
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>
2008-06-30 14:19:09 +01:00
Keir Fraser dfff66aee9 x86_emulate: Support CMPXCHG16B.
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>
2008-04-22 14:34:16 +01:00
Keir Fraser a6836b4fdd x86_emulate: Implement a more dynamic interface for handling FPU
exceptions, which will allow emulation stubs to be built dynamically
in a future patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-16 16:10:41 +01:00
Keir Fraser 0080a146fc x86 firmware: Consolidate firmware common build rules.
Also avoid overriding global optimisation default (-O1, -O2, etc.)

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-02 10:42:27 +01:00
Keir Fraser c0b0636f38 x86_emulate: Remove environment-specific definitions from core
emulator source files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-31 14:21:13 +01:00
Keir Fraser 2bd0e7b965 x86_emulate: Allow writeback-avoidance optimisation to be defeated by
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>
2008-02-21 14:50:27 +00:00
Keir Fraser ad703ba167 tools: Avoid -nostdlib argument to $(LD).
This interacts badly with GNU ld on Solaris.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-13 17:57:22 +00:00
Keir Fraser bc0389d051 solaris: Fix Solaris tools build.
Signed-off-by: John Levon <john.levon@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-02 10:16:37 +00:00
kfraser@localhost.localdomain fffb99beab x86: Extend emulator return codes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-21 19:58:58 +00:00
kfraser@localhost.localdomain 12d473893b [XEN] Allow stack-address-size to be specified differently from
regular address-size in the emulator.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-15 15:43:20 +00:00
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