Update TODO regarding ARM

Specifically leave a note that big endian support is not yet there.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tooling: Silence recursive make calls

Generalize install.mk to include.mk so that it can host the Q tag
definition. Apply this tag on the recursive make call of the top-level
makefile.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tooling: Add copyright header to make_release

Top-level license already applied, but let's make it also formally
clear.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: config-create: cosmetic changes for pep8 compliance

Fix syntax according to pep8 and remove stale function return.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: config create: change the way input files are handled

Switch from automatically generated lists of input files to
hand-maintained ones. Generating the lists turned out to make the code
less readable. All the parse-functions would have to be called just to
collect theire opens.
Now we still use the input_open wrapper to prefix the opens with the
root_dir and we make sure that the file one is trying to open is listed
as an input file and will therefore be collected by the collector.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
x86: make the x86 types-definitions work on either x86-32 and x86-64

For Intel TXT we will need to work in 32bit mode for a limited amount of
time. To make sure we can use certain headers and definitions safely in
both modes, change the definition of `u64` to use `long long` instead of
`long` (which changes its length depending on the arch).

Furthermore, the x86-header defines a macro BITS_PER_LONG, currently we
define this always as `64`. To make this usable for the TXT-stub, hide
this behind an `ifndef`. The current hypervisor-code won't be affected
by this change and we can define this for the TXT-stub with our tooling,
thus make the header usable in both modes.

Signed-off-by: Benjamin Block <bebl@mageta.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: make the jailhouse-header arch-independent

The header of jailhouse is defined with arch-dependent types such as
`unsigned long` which on linux varies in size. Because this header can
be considered the "communication"-relay with the environment, it should
be type-safe on any arch. Thus change all types into fixed-size-types.

Signed-off-by: Benjamin Block <bebl@mageta.org>
[Jan: adjusted jailhouse_entry to keep unsigned int]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tooling: Remove debugging left-over in gen_version_h

Stop polluting the source directory with this useless diff.log that was
once added during development.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tooling: Fix gen_version_h to query git support for the correct repository

The initial git availability check ran in the kernel directory instead
of the Jailhouse source tree. Fix it by moving the cd before it. Also
quote the input path properly at this chance.

Reported-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Documentation: Add Doxygen infrastructure

We diverge from Linux kernel style and use Doxygen as our code
documentation generator, see [1] for the reasoning. This adds the
required build infrastructure. Run "make docs" to trigger it (not
automatically done via other targets).

[1] http://thread.gmane.org/gmane.linux.jailhouse/1281

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Prefix arch-specific PCI functions properly

Add the "arch_"-prefix to pci_suppress_msi, pci_update_msi and
pci_update_msix_vector. This clearly signals that those functions have
to be implemented by the architecture support.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Document PCI subsystem interfaces

Convert existing kernel-doc comments to doxygen style and add missing
functions and structure descriptions for public interfaces. Architecture
specific functions are documented in the headers to avoid duplications
at the implementation site.

No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Rename page_map_* -> paging_*

The module is already called "paging", so lets call its functions like
this as well. No functional changes.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Rename *MAX_PAGE_DIR_LEVELS to *MAX_PAGE_TABLE_LEVELS

To be consistent with terms used throughout the hypervisor.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Rename arch-specific cache and TLB flush functions

Consistently add "arch_" and the subsystem prefix und use clearer names
for cache and TLB flushing services.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Document page management subsystem interfaces

This adds doxygen-style documentation for public parts of the page
management subsystem. Again we place documentation of architecture-
provided entities in the generic header.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Factor out generic jailhouse/types.h

Some types in the architecture-specific header are in fact generic. Move
them into a separate header and include this one directly from now on.
Document cpu_set at this chance according to doxygen style.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Remove cpu_data parameter from hypercall functions

We can obtain a reference on demand now.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Remove unused cpu_data from arch_cell_create/destroy

Became obsolete with 77b0e690ec.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Remove cpu_data from arch_config_commit

We can obtain a reference inside arch_config_commit. This also allows to
drop cpu_data from late_init.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>