tools: jailhouse: Use a libexec subdir for extension scripts

We want our extension scripts to be under a standard directory, namely
$libexecdir/<package>. As libexecdir may be overwritten during
installation, accept it from the Makefile via a define.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
configs: Avoid spaces in QEMU config name

Specifically bash completion is more fun without them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: config-create: Add support for using a data directory

Once installed, the jailhouse-config-create has to be able to use a data
directory for finding its templates. That dir will typically be
different from the one where the script is located. Prepare for this by
providing a datadir variable assignment that can be patched during
installation.

When running from the source tree, we continue to use that directory as
default template dir.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: Hide some secondary build commands

By default, hide commands that are not essential for following the build
(or installation) process. Those can still be revealed by specifying
V=1. chmod is a first candidate.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: Add installation rules

This installs the jailhouse tool, its helper scripts and the template
files to standard, configurable directories. We patch the config
generator on installation so that the target version is aware of the
chosen data directory.

Note that installing the bash completion is left up to the user. There
is apparently no distro-independent way to achieve this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: Remove dependency of jailhouse tool on cell-config.h

Two things caused jailhouse.h and, thus, tools/jailhouse.c to depend on
the cell configuration header: the definition of the JAILHOUSE_ENABLE
IOCTL and the maximum cell name length in config files.

The first dependency is not only unneeded (the command line tool passed
the an uninterpreted blob via JAILHOUSE_ENABLE), it also made the driver
ABI change each time we updated the config format. So replace the
reference to struct jailhouse_system in JAILHOUSE_ENABLE with a symbolic
"void *".

The second dependency is also unneeded: While the name length used in
configs and, thus, also inside the driver to reference cells should be
identical to the lengths we use in struct jailhouse_cell_id, there is no
hard dependency. In the worst case (different lengths), we would fail to
address cells by name. However, these lengths are unlikely to change. So
simply define our own name length for that struct and test for
deviations during the driver build.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core/driver: Add version information

Create a version string in the format

    vX.Y (<commits-since-vX.Y>-<git-hash>[-dirty])

and embed it into the hypervisor core as well as the driver module.
Helps to identify what is actually executed.

The management tool is more decoupled from those two and will get a
simpler version tag.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: Add Version information to command line tool

Dump the static version tag from the management tool when invoked with
"--version". We don't need precise git-based tracking here as interfaces
are fairly decoupled now.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
scripts: Add release-maker script

To document the steps in a productive way. The final git push is not
included, intentionally.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
README: Describe installation process

make install is now consistently available.

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

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