aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
Commit message (Collapse)AuthorAgeFilesLines
* X86-MCE: fix a bug of xen-mceinj toolLiu, Jinsong2011-12-181-1/+5
| | | | | | | Fix a bug of xen-mceinj tool which used to test mce by software way. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* x86/emulator: workaround for AMD erratum 573Jan Beulich2011-12-161-0/+2
| | | | | | | | | | | | | | | | | The only cases where we might end up emulating fsincos (as any other x87 operations without memory operands) are - when a HVM guest is in real mode (not applicable on AMD) - between two half page table updates in PAE mode (unlikely, and not doing the emulation here does affect only performance, not correctness) - when a guest maliciously (or erroneously) modifies an (MMIO or page table update) instruction under emulation (unspecified behavior) Hence, in order to avoid the erratum to cause harm to the entire host, don't emulate fsincos on the affected AMD CPU families. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/emulator: add emulation of SIMD FP movesJan Beulich2011-12-011-0/+54
| | | | | | | | | | Clone the existing movq emulation to also support the most fundamental SIMD FP moves. Extend the testing code to also exercise these instructions. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/emulator: generalize movq emulation (SSE2 and AVX variants)Jan Beulich2011-12-011-0/+187
| | | | | | | | | | | | Extend the existing movq emulation to also support its SSE2 and AVX variants, the latter implying the addition of VEX decoding. Fold the read and write cases (as most of the logic is identical), and add movntq and variants (as they're very similar). Extend the testing code to also exercise these instructions. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* test_x86_emulator: add a "run" target to the test code makefileJan Beulich2011-11-161-0/+4
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Keir Fraser <keir@xen.org>
* x86_emulate: Define and use BUG() and bool_t.Keir Fraser2011-11-161-0/+6
| | | | | Original patch by Jan Beulich <jbeulich@suse.com> Signed-off-by: Keir Fraser <keir@xen.org>
* test_x86_emulate: Get public Xen headers via tools/include.Keir Fraser2011-11-163-4/+6
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86-64/test_x86_emulate: fix blowfish testJan Beulich2011-11-161-1/+1
| | | | | | | | Incorrect register usage in the _start() wrapper caused the 64-bit execution emulation to fail. Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Keir Fraser <keir@xen.org>
* mem_event: use different ringbuffers for share, paging and accessOlaf Hering2011-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Up to now a single ring buffer was used for mem_share, xenpaging and xen-access. Each helper would have to cooperate and pull only its own requests from the ring. Unfortunately this was not implemented. And even if it was, it would make the whole concept fragile because a crash or early exit of one helper would stall the others. What happend up to now is that active xenpaging + memory_sharing would push memsharing requests in the buffer. xenpaging is not prepared for such requests. This patch creates an independet ring buffer for mem_share, xenpaging and xen-access and adds also new functions to enable xenpaging and xen-access. The xc_mem_event_enable/xc_mem_event_disable functions will be removed. The various XEN_DOMCTL_MEM_EVENT_* macros were cleaned up. Due to the removal the API changed, so the SONAME will be changed too. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* tools/tests/xen-access: minor bug fixesAravindh Puthiyaparambil2011-05-091-5/+2
| | | | | | | | Fix a couple of minor bugs in xen-access test program: * Fix -m option handling. * Fix a segfault that was occurring during program exit. Signed-off-by: Aravindh Puthiyaparambil <aravindh@virtuata.com>
* tools: remove pattern matched linking rulesIan Campbell2011-03-312-12/+7
| | | | | | | | | Most subdirs only build a single tool to start with and those which build multiple tools often have different linkage requirements. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-312-9/+3
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.Ian Campbell2011-03-212-2/+2
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-212-2/+2
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Drop XEN_XC variableIan Campbell2011-03-212-2/+0
| | | | | | | | | There is nothing to include in the python bindings source directory and likely never was/will be ... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Drop use of $(INCLUDES)Ian Campbell2011-03-212-10/+8
| | | | | | | | | | Several places include it in CFLAGS even though it is never defined. A few others use it as nothing more than a gathering point for CFLAGS. Get rid of it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-174-4/+4
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* mem_access test tool: xen-accessJoe Epstein2011-01-082-0/+704
| | | | | | | | Added a test tool to let the memory access APIs be tested. This tool logs to stdout the memory accesses that the domain given is performing. Signed-off-by: Joe Epstein <jepstein98@gmail.com> Signed-off-by: Keir Fraser <keir@xen.org>
* tools/tests: Move x86 emulator tests into a subdirKeir Fraser2011-01-085-2/+2
| | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xen.org> --HG-- rename : tools/tests/Makefile => tools/tests/x86_emulator/Makefile rename : tools/tests/blowfish.c => tools/tests/x86_emulator/blowfish.c rename : tools/tests/blowfish.mk => tools/tests/x86_emulator/blowfish.mk rename : tools/tests/test_x86_emulator.c => tools/tests/x86_emulator/test_x86_emulator.c rename : tools/tests/x86_emulate.c => tools/tests/x86_emulator/x86_emulate.c
* Xen MCE test: all test casesKeir Fraser2010-12-2411-0/+795
| | | | | | | | | | Implement the test cases. Each of cases will call the common function, then call mce inject tool. README for Xen MCE test suite, include the framwork and test instruction. Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Haicheng Li<haicheng.li@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com>
* Xen MCE test: common functions to be used for test casesKeir Fraser2010-12-242-0/+286
| | | | | | | | | | Implement some common shell functions and variable definitions are defined to be used by test cases Verify fuctions include domain0 user space tool mcelog, Xen dmesg and guest kernel log verification. Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Haicheng Li<haicheng.li@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com>
* Xen MCE test: utilities to inject fake MCE for X86Keir Fraser2010-12-243-0/+696
| | | | | | | | | | | A software MCE injection tool, which is based on Xen MCE injection mechanism. It fake MCE error and inject this error to a assigned Domain Physical Address. Makefile make sure the tool can be built on Xen. A README explain the usage for this tool. Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Haicheng Li<haicheng.li@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com>
* tools/tests: Test 64-bit x86 emulation in test_x86_emulate.Keir Fraser2010-10-114-393/+417
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Add -fno-exceptions to list of possibly-supported CFLAGS for embedded ↵Keir Fraser2010-07-251-4/+1
| | | | | | targets. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xend: Add support for URI ('file:' and 'data:' scheme) for PV/kernelKeir Fraser2009-08-255-0/+566
| | | | | | | | | | | | | | | | | | | | | and PV/ramdisk Add support for 'file:' and 'data:' URI schemes for the parameters 'PV/kernel' and 'PV/ramdisk' in the VM.create() call. The 'data:' scheme handling enables using a file which is stored inside the management system (from where the XenAPI call is send) as kernel or ramdisk. Notes: o all included: a detailed description can be found in the xenapi documentation o bumped up the version of the API document to 1.0.8 (because of (minimal) interface extension) o Future enhancements (like http:, ftp: schemes) fit seamlessly into the current design / classes o Unittest cases and xm-test case included Signed-off-by: Andreas Florath <xen@flonatel.org>
* x86: miscellaneous emulator adjustmentsKeir Fraser2009-08-191-1/+1
| | | | | | | | | | | | | | | | | | Defer fail_if()-s as much as possible (in favor of possibly generating exceptions), and avoid generating exceptions when not strictly necessary. Avoid fail_if()-s for simple return code checks (making the code that used them consistent with other, longer existing code). Eliminate redundant generate_exception_if()-s checking lock_prefix (which is already covered by the general check prior to decoding operands). Also fix the testing code to add PROT_EXEC for the mapping that is intended to have instruction executed from. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* tools/tests/regression/: Fix some paths and scripts.Keir Fraser2009-08-024-52/+67
| | | | | | | | | 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>
* tools/tests: Add syntax check for different versions of pythonKeir Fraser2009-07-285-0/+177
| | | | | From: Andreas Florath <xen@flonatel.org> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* build: Define cc-option-add to immediately add options to CFLAGSKeir Fraser2009-01-131-3/+3
| | | | | | | 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>
* 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>