]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/log
people/royger/xen-test-framework.git
9 years agoRename CONFIG_ENV_{pv,hvm} to CONFIG_{PV,HVM}
Andrew Cooper [Mon, 18 Jan 2016 10:48:44 +0000 (10:48 +0000)]
Rename CONFIG_ENV_{pv,hvm} to CONFIG_{PV,HVM}

to avoid them being easily confused with the environment-specific defined.

Additionally, reduce the usage of the environment-specific defines to an
absolute minimum, to avoid latent issues when introducing new environments.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoRework the build systems environment list generation
Andrew Cooper [Mon, 18 Jan 2016 10:48:26 +0000 (10:48 +0000)]
Rework the build systems environment list generation

and use this to reduce the amount of repetition in the object list generation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoMisc docs improvements
Andrew Cooper [Fri, 15 Jan 2016 15:34:59 +0000 (15:34 +0000)]
Misc docs improvements

* Include assembly files.  They are not processed for structured comments, but
  are are available to be viewed and referred to.
* Use the preferred @# to prevent automatic linking when using #
* Disable timestamps.  Helps when comparing generated content.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoInclude local variables in all files currently missing them
Andrew Cooper [Fri, 15 Jan 2016 15:31:09 +0000 (15:31 +0000)]
Include local variables in all files currently missing them

Correct some accidental introduction of tabs in arch/x86/link.lds.S

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAvoid overflow in compare_extable_entry() when entries are far appart
Andrew Cooper [Fri, 15 Jan 2016 15:02:00 +0000 (15:02 +0000)]
Avoid overflow in compare_extable_entry() when entries are far appart

Constrain the return value to strictly between -1 and 1.  Without this,
sorting extable entries which are further than 2GB apart fails, as the
calculation overflows the return value.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoImport xen/errno.h from Xen's public API
Andrew Cooper [Fri, 15 Jan 2016 14:43:45 +0000 (14:43 +0000)]
Import xen/errno.h from Xen's public API

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce 'skip' as a test result
Andrew Cooper [Fri, 15 Jan 2016 12:48:07 +0000 (12:48 +0000)]
Introduce 'skip' as a test result

There are situations where the test cannot be completed, and this might be
considered success or failure, depending on the exact outcome intended by the
individual who is running the tests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoInclude xtf/hypercall.h in xtf/lib.h
Andrew Cooper [Fri, 15 Jan 2016 14:04:55 +0000 (14:04 +0000)]
Include xtf/hypercall.h in xtf/lib.h

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoTest software injection of `into` in 32bit builds
Andrew Cooper [Thu, 14 Jan 2016 12:24:52 +0000 (12:24 +0000)]
Test software injection of `into` in 32bit builds

The `into` instruction is another software interrupt, which raises an #OF trap
if the overflow flag is set.  It is only recognised in 32bit code however, and
yields #UD if exectued in long mode.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoDocument the history of the framework
Andrew Cooper [Thu, 14 Jan 2016 12:41:46 +0000 (12:41 +0000)]
Document the history of the framework

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSoftware interrupt emulation testing
Andrew Cooper [Thu, 6 Nov 2014 14:16:42 +0000 (14:16 +0000)]
Software interrupt emulation testing

Test documentation is at the head of main.c

Additionally

* Don't warn on unused parameters - there are legitimate reasons for a
  parameter to be unused.
* Make xtf/extable.h safe for inclusion in assembly files.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroductory documentation
Andrew Cooper [Wed, 6 Jan 2016 12:50:16 +0000 (12:50 +0000)]
Introductory documentation

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoUpdate Doxyfile to Doxygen 1.8.8
Andrew Cooper [Sun, 10 Jan 2016 19:09:02 +0000 (19:09 +0000)]
Update Doxyfile to Doxygen 1.8.8

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoProvide a Forced Emulation identifier rather than hand-rolling assembly
Andrew Cooper [Wed, 13 Jan 2016 10:49:46 +0000 (10:49 +0000)]
Provide a Forced Emulation identifier rather than hand-rolling assembly

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAllow tests to provide their own custom unhandled exception handler
Andrew Cooper [Mon, 11 Jan 2016 19:21:54 +0000 (19:21 +0000)]
Allow tests to provide their own custom unhandled exception handler

Useful for non-standard fixup, or for logging something more helpful than the
plain panic() message.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoError code constants for selector-based error codes
Andrew Cooper [Fri, 8 Jan 2016 19:11:59 +0000 (19:11 +0000)]
Error code constants for selector-based error codes

Provide symbolic constant support as well.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoMake symbolic constant generation more generic
Andrew Cooper [Fri, 8 Jan 2016 18:59:02 +0000 (18:59 +0000)]
Make symbolic constant generation more generic

The existing _GDTE_ATTR() macros are fine for GDT entries, but not much use
for anything else.

Replace the existing VAR_MACRO() with VAR_MACRO_C1(), which works in the same
way but passes a constant through, and use this to implement TOK_OR() which
works like _GDTE_ATTR() but takes a parameter rather than a hard coded
SEG_ATTR_.

Document the entities fully, and fix them to work correctly with empty
__VA_ARGS__.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSplit out symbolic constant support into a separate file
Andrew Cooper [Fri, 8 Jan 2016 18:25:40 +0000 (18:25 +0000)]
Split out symbolic constant support into a separate file

While moving, rename _INIT_GDTE() to INIT_GDTE() and drop INIT_GDTE_RAW()
entirely.  Document the new INIT_GDTE() and implement INIT_GDTE_SYM() using
it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoRearrange includes
Andrew Cooper [Fri, 8 Jan 2016 18:18:19 +0000 (18:18 +0000)]
Rearrange includes

For simplicity, tests should just include <xtf/lib.h> and get all the common
infrastructure for free.  All type definitions should come from <xtf/types.h>.
Fix one declaration vs definition mismatch uncovered.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoUnmap the page at 0 to catch errors with NULL pointers
Andrew Cooper [Fri, 8 Jan 2016 17:44:13 +0000 (17:44 +0000)]
Unmap the page at 0 to catch errors with NULL pointers

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce exec_user() to run a function at user privilege
Andrew Cooper [Thu, 24 Dec 2015 23:36:47 +0000 (23:36 +0000)]
Introduce exec_user() to run a function at user privilege

Add a selftest to confirm functionality.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAllow a test to raise privilege back to kernel level
Andrew Cooper [Thu, 24 Dec 2015 23:22:48 +0000 (23:22 +0000)]
Allow a test to raise privilege back to kernel level

to facilitate tests which switches privilege during the course of its run.

This is achieved by providing a dpl3 IDT entry which restores %esp and jumps
to the %eip found in the exception frame.

Therefore, 'int $0x20' acts as function call which returns at the kernels cpl.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSetup for 32bit PV userspace execution
Andrew Cooper [Thu, 24 Dec 2015 21:09:47 +0000 (21:09 +0000)]
Setup for 32bit PV userspace execution

* Implement hypercall_update_va_mapping().
* Walk the live pagetables setting _PAGE_USER.

For now, 32bit PV XTF guests need to be run on a hypervisor booted with
"smep=0 smap=0" to prevent Xen's %cr4 settings from interfering.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSetup for 64bit PV userspace execution
Andrew Cooper [Thu, 24 Dec 2015 21:06:00 +0000 (21:06 +0000)]
Setup for 64bit PV userspace execution

* Implement read_cr3(), HYPERCALL4() and hypercall_mmuext_op().
* Use FLAT_RING3_SS64 for __{KERN,USER}_DS.
* Set user %cr3.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSetup for common PV userspace execution
Andrew Cooper [Thu, 24 Dec 2015 21:04:27 +0000 (21:04 +0000)]
Setup for common PV userspace execution

* Implement and use hypercall_stack_switch().
* Implement {read,write}_[cdefgs]s() wrappers.
* Use __USER_DS for the regular data segment selectors.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSetup for HVM userspace execution
Andrew Cooper [Thu, 24 Dec 2015 20:45:43 +0000 (20:45 +0000)]
Setup for HVM userspace execution

* Introduce definitions for a task state segment and load one.
* Use __USER_DS for the regular data segment selectors.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoFactor low level difference between PV and HVM into macros
Andrew Cooper [Thu, 24 Dec 2015 23:14:23 +0000 (23:14 +0000)]
Factor low level difference between PV and HVM into macros

to reduce code duplication when further entry/exit paths are added.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoCommon infrastructure for userspace execution
Andrew Cooper [Thu, 24 Dec 2015 20:22:30 +0000 (20:22 +0000)]
Common infrastructure for userspace execution

Introduce __USER_{CS,DS}, expand the boot stack to two pages, add some DPL3
GDT descriptors, and space in GDT for a TSS.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce test_setup() to detect runtime support relevant for tests
Andrew Cooper [Tue, 22 Dec 2015 20:20:23 +0000 (20:20 +0000)]
Introduce test_setup() to detect runtime support relevant for tests

Currently it just identifies whether the Forced Emulation Prefix is available.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoException Logging support
Andrew Cooper [Mon, 21 Dec 2015 10:47:22 +0000 (10:47 +0000)]
Exception Logging support

Provide an interface whereby a test can log all exceptions which occur, and
query the log after the fact.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAlter pv64 kernel selectors to be rpl0
Andrew Cooper [Mon, 21 Dec 2015 19:01:58 +0000 (19:01 +0000)]
Alter pv64 kernel selectors to be rpl0

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoException table infrastructure
Andrew Cooper [Wed, 16 Dec 2015 19:04:03 +0000 (19:04 +0000)]
Exception table infrastructure

To redirect control flow if a fault occurs.  Entries are registered with the
_ASM_EXTABLE() and placed in the .ex_table section, which is collected
together by the linker.

The .ex_table section is sorted on boot (to facilitate fast searching), and
searched in do_exception() when a fault or abort is encountered.  If a
matching entry is found, control flow is redirected and the exception returned
from.

Some of the changes are to make the two asm_macros.h files safe to include in
C code.  In addition, an extra selftest is added, making use of the exception
table infrastructure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoProvide a heapsort() implementation
Andrew Cooper [Thu, 17 Dec 2015 11:20:36 +0000 (11:20 +0000)]
Provide a heapsort() implementation

Modelled after qsort() in the C standard library.  Sorts in place.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAvoid __always_inline conflicting with cdef.h
Andrew Cooper [Fri, 18 Dec 2015 11:46:13 +0000 (11:46 +0000)]
Avoid __always_inline conflicting with cdef.h

Fixes build issues with the build-time selftests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoXTF Selftests
Andrew Cooper [Tue, 8 Dec 2015 12:37:04 +0000 (12:37 +0000)]
XTF Selftests

Provide a sanity test of the environment and infrastructure provided by the
test framework itself.  These are all expected to pass.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoModify entry points to be able to return from exceptions
Andrew Cooper [Tue, 15 Dec 2015 09:33:45 +0000 (09:33 +0000)]
Modify entry points to be able to return from exceptions

Trap and Interrupt exceptions will now return, while Fault and Abort
exceptions are still fatal.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoRepresent exception frames in C
Andrew Cooper [Mon, 14 Dec 2015 09:00:02 +0000 (09:00 +0000)]
Represent exception frames in C

Introduce struct cpu_regs, and make the entry points create the expected
layout.

As part of this, split the very x86 bits of asm_macros.h into a new header
file.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoPV exception entry points
Andrew Cooper [Fri, 11 Dec 2015 17:12:01 +0000 (17:12 +0000)]
PV exception entry points

Infrastructure to register the virtual IDT with Xen and get execution back
into C when an exception occurs.  The existing 32 and 64bit entry points are
mostly reused, with small adjustments for PV guests.

Most of this change is importing and implementing Xen ABI bits for PV guests.

Exceptions are currently fatal.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoHVM exception entry points
Andrew Cooper [Fri, 11 Dec 2015 15:50:25 +0000 (15:50 +0000)]
HVM exception entry points

Infrastructure to set up the IDT and get execution back into C when an
exception occurs.

Exceptions are currently fatal.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoRefactor architectural trap setup
Andrew Cooper [Fri, 11 Dec 2015 15:35:12 +0000 (15:35 +0000)]
Refactor architectural trap setup

The setup of entry points is very different between PV and HVM guests.
Introduce two new traps.c to accommodate, a stub arch_init_traps(), and a stub
do_trap() as the C entry point for traps.

Adjust the single arch_crash_hard() into the relevant arch traps.c to reduce
the #ifdef'ary

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agox86 architectural infrastructure for exception handling
Andrew Cooper [Fri, 11 Sep 2015 13:21:24 +0000 (14:21 +0100)]
x86 architectural infrastructure for exception handling

Unlike the GDT which PV guests might have a legitimate interest in, a PV guest
genuinely has no interest in an x86 architectural IDT.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoMove build system into build/
Andrew Cooper [Thu, 10 Dec 2015 16:03:57 +0000 (16:03 +0000)]
Move build system into build/

In hindsight, config/ was not the best choice of names.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoImport and declare all hypercall entry points
Andrew Cooper [Thu, 10 Dec 2015 15:04:03 +0000 (15:04 +0000)]
Import and declare all hypercall entry points

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoReduce the quantity of token concatenation with hypercall declarations
Andrew Cooper [Thu, 10 Dec 2015 16:45:04 +0000 (16:45 +0000)]
Reduce the quantity of token concatenation with hypercall declarations

Allows better indexing from tools such as cscope

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAvoid a constantly rebooting domain when triple faults occur
Andrew Cooper [Thu, 10 Dec 2015 14:03:30 +0000 (14:03 +0000)]
Avoid a constantly rebooting domain when triple faults occur

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoFix booting the HVM tests on hardware without hap support
Andrew Cooper [Wed, 9 Dec 2015 10:44:16 +0000 (10:44 +0000)]
Fix booting the HVM tests on hardware without hap support

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce __noinline and __always_inline annotations
Andrew Cooper [Mon, 7 Dec 2015 21:43:38 +0000 (21:43 +0000)]
Introduce __noinline and __always_inline annotations

Additionally, switch to uniformly use of the double-underscore variants of
attribute names.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoPull all definitions from stddef.h, including bits like offsetof()
Andrew Cooper [Mon, 7 Dec 2015 21:34:34 +0000 (21:34 +0000)]
Pull all definitions from stddef.h, including bits like offsetof()

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAdd to clean/distclean rules
Andrew Cooper [Mon, 7 Dec 2015 17:38:26 +0000 (17:38 +0000)]
Add to clean/distclean rules

Remove generated configuration files, and delete cscope files in any
directory.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAdjust linker script to avoid having a PT_LOAD header all the way from zero
Andrew Cooper [Mon, 7 Dec 2015 14:37:28 +0000 (14:37 +0000)]
Adjust linker script to avoid having a PT_LOAD header all the way from zero

Previously, the generated binaries had a single PT_LOAD header all the
way from 0 to the end of the generated code.

When building, the domain builder maps the entire region and
zeroes/copies the data as appropriate.  This causes a failure to build
when the header overlaps with unmapped addresses such as the HVM legacy
VGA range.

Link all binaries to load and run at 1MB to avoid the legacy VGA hole in
HVM guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoCreate hvm64 test binaries as elf32, take 2
Andrew Cooper [Sun, 6 Dec 2015 18:30:46 +0000 (18:30 +0000)]
Create hvm64 test binaries as elf32, take 2

Experimentally, gcc/binutils from Debian Jessie (4.9.2/2.25) and CentOS
7.1 (4.8.3/2.23) don't make valid binaries when linking x86-64 object
files as elf32-x86-64.

Issues include corrupt DWARF debugging information (as confirmed by
gdb/readelf), and erroneously merged strings in .rodata (as confirmed by
strings).

Instead, link all binaries in their natural width, and objcopy hvm64
binaries to elf32-x86-64 after the fact.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoProvide memset() and memcmp()
Andrew Cooper [Thu, 3 Dec 2015 16:01:53 +0000 (16:01 +0000)]
Provide memset() and memcmp()

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoUndo previous change to link.lds.S
Andrew Cooper [Thu, 3 Dec 2015 15:56:40 +0000 (15:56 +0000)]
Undo previous change to link.lds.S

1MB != 0x10000, and while this shouldn't actually matter, it causes the
domain builder to choke for HVM guests.

Revert for now, until the domain builders' behaviour is understood.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce macros for basic number manipulation
Andrew Cooper [Sat, 24 Oct 2015 10:17:17 +0000 (11:17 +0100)]
Introduce macros for basic number manipulation

And sprinkle them through the existing code.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAvoid failing to build if the last directory lacks a Makefile
Andrew Cooper [Wed, 2 Dec 2015 10:22:39 +0000 (10:22 +0000)]
Avoid failing to build if the last directory lacks a Makefile

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoAutomatically include config.h for all per-arch translation units
Andrew Cooper [Sun, 29 Nov 2015 19:46:47 +0000 (19:46 +0000)]
Automatically include config.h for all per-arch translation units

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoCreate hvm64 test binaries as elf32
Andrew Cooper [Thu, 12 Nov 2015 14:56:01 +0000 (14:56 +0000)]
Create hvm64 test binaries as elf32

New improvements to the HVM domain building logic actually sanity check the
binary for being 32bit, as all HVM domains start in 32bit mode.

Previously, elf64 binaries were erroneously accepted.

In addition, drop the big/little endian bits.  x86 is unlikely to ever have a
big endian variant.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoExpose the GDT to C code
Andrew Cooper [Fri, 30 Oct 2015 14:49:37 +0000 (14:49 +0000)]
Expose the GDT to C code

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoFix per-arch .S generation rule to properly pass $AFLAGS
Andrew Cooper [Fri, 30 Oct 2015 14:00:40 +0000 (14:00 +0000)]
Fix per-arch .S generation rule to properly pass $AFLAGS

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoModify default xl cfg files to name the VM identically to the kernel used
Andrew Cooper [Fri, 23 Oct 2015 14:48:01 +0000 (15:48 +0100)]
Modify default xl cfg files to name the VM identically to the kernel used

Suggested-by: Anshul Makkar <anshul.makkar@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoGenerate xl configuration files for tests
Andrew Cooper [Thu, 22 Oct 2015 10:43:35 +0000 (11:43 +0100)]
Generate xl configuration files for tests

For now just the default configuration, which gets slightly customised
for each generated environment.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoOnly recurse into directories with a Makefile
Andrew Cooper [Thu, 22 Oct 2015 09:53:41 +0000 (10:53 +0100)]
Only recurse into directories with a Makefile

Git will leave directories around by default when switching branches,
which causes unnecessary build failures.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoDisable LTO for now
Andrew Cooper [Thu, 22 Oct 2015 09:42:48 +0000 (10:42 +0100)]
Disable LTO for now

It clearly isn't wired up correctly at the moment, and causes build
issues on Debian Jessie.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoDefault CC to gcc
Andrew Cooper [Wed, 30 Sep 2015 14:54:24 +0000 (15:54 +0100)]
Default CC to gcc

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoShort summary of execution environment
Andrew Cooper [Sun, 30 Aug 2015 22:27:10 +0000 (23:27 +0100)]
Short summary of execution environment

9 years agoInterface for test reports
Andrew Cooper [Fri, 14 Aug 2015 17:31:04 +0000 (18:31 +0100)]
Interface for test reports

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoHVM 32 and 64bit environment
Andrew Cooper [Wed, 29 Apr 2015 16:31:43 +0000 (17:31 +0100)]
HVM 32 and 64bit environment

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoHVM basic setup
Andrew Cooper [Mon, 4 May 2015 16:54:04 +0000 (17:54 +0100)]
HVM basic setup

 * Hypercalls
 * PV and Qemu console
 * Memory management
 * Pagetables

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoLDT/GDT infrastructure
Andrew Cooper [Mon, 4 May 2015 16:52:45 +0000 (17:52 +0100)]
LDT/GDT infrastructure

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agox86 architectural MSR/CR constants and instruction wrappers
Andrew Cooper [Mon, 4 May 2015 16:51:48 +0000 (17:51 +0100)]
x86 architectural MSR/CR constants and instruction wrappers

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoXen ABI bits for HVM guests
Andrew Cooper [Wed, 29 Apr 2015 16:50:56 +0000 (17:50 +0100)]
Xen ABI bits for HVM guests

 - HVMOP_get_param
 - HVM PV Console parameters
 - Xen CPUID leaves

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce and use a boot stack (one page)
Andrew Cooper [Tue, 24 Mar 2015 18:27:25 +0000 (19:27 +0100)]
Introduce and use a boot stack (one page)

HVM guests don't have one provided by the domain builder.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoIntroduce panic() and use it to cover some exceptional cases
Andrew Cooper [Sat, 2 May 2015 10:52:29 +0000 (11:52 +0100)]
Introduce panic() and use it to cover some exceptional cases

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoUse vsnprintf() to provide full formatting capabilities to the console
Andrew Cooper [Sun, 12 Apr 2015 01:55:01 +0000 (02:55 +0100)]
Use vsnprintf() to provide full formatting capabilities to the console

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoInteger subset of vsnprintf(), including 64bit types in 32bit build
Andrew Cooper [Mon, 23 Mar 2015 16:40:21 +0000 (17:40 +0100)]
Integer subset of vsnprintf(), including 64bit types in 32bit build

Also a test binary which compares this implementation to the local libc's
implementation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoImplement strnlen()
Andrew Cooper [Sun, 12 Apr 2015 00:28:38 +0000 (01:28 +0100)]
Implement strnlen()

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoProvide 64bit division in 32bit environments
Andrew Cooper [Sun, 12 Apr 2015 17:39:41 +0000 (18:39 +0100)]
Provide 64bit division in 32bit environments

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoPV Console driver. Synchronous output only
Andrew Cooper [Fri, 20 Mar 2015 23:30:35 +0000 (00:30 +0100)]
PV Console driver.  Synchronous output only

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoOrdering primitives, suitable for a shared ring
Andrew Cooper [Sun, 22 Mar 2015 14:54:05 +0000 (15:54 +0100)]
Ordering primitives, suitable for a shared ring

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoBasic memory management for PV guests, sufficient to obtain the console ring virtual...
Andrew Cooper [Fri, 20 Mar 2015 21:28:24 +0000 (22:28 +0100)]
Basic memory management for PV guests, sufficient to obtain the console ring virtual address

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoHypercall infrastructure needed for writing to a PV console
Andrew Cooper [Thu, 19 Mar 2015 21:13:51 +0000 (22:13 +0100)]
Hypercall infrastructure needed for writing to a PV console

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoWrite to the hypervisor console
Andrew Cooper [Sun, 29 Mar 2015 18:17:05 +0000 (19:17 +0100)]
Write to the hypervisor console

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoBasic console and printk() infrastructure
Andrew Cooper [Sat, 23 May 2015 22:23:42 +0000 (23:23 +0100)]
Basic console and printk() infrastructure

printk() can currently only deal with a plain string, and the output goes
nowhere.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoArchitecture specific setup, obtaining the PV start_info page
Andrew Cooper [Wed, 18 Mar 2015 12:44:38 +0000 (13:44 +0100)]
Architecture specific setup, obtaining the PV start_info page

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoBasic hypercall infrastructure. Tests now shut down as opposed to spinning in a...
Andrew Cooper [Tue, 17 Mar 2015 23:38:31 +0000 (00:38 +0100)]
Basic hypercall infrastructure.  Tests now shut down as opposed to spinning in a loop

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoBasic build system and pv32/64 stubs. They currently spin in a loop
Andrew Cooper [Tue, 17 Mar 2015 23:15:02 +0000 (00:15 +0100)]
Basic build system and pv32/64 stubs.  They currently spin in a loop

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoDoxygen configuration
Andrew Cooper [Wed, 29 Apr 2015 16:10:35 +0000 (17:10 +0100)]
Doxygen configuration

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
9 years agoSome introductory text files
Andrew Cooper [Sun, 29 Mar 2015 17:34:36 +0000 (18:34 +0100)]
Some introductory text files

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agoInitial commit
Andrew Cooper [Tue, 4 Nov 2014 20:48:27 +0000 (20:48 +0000)]
Initial commit

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>