core: Compact local variable list in paging_init

No functional change.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Clarify local variable meaning in init_early

This size is the sum of the core and the per-CPU data area.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Calculate core and per-CPU data region size differently

Use pointer arithmetic to obtain the size of the region that contains
the hypervisor core and the per-CPU data structures. system_config tells
us where it ends.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Validate CPU ID before using it

Currently, Linux ensures that we have enough room in the per-CPU data
area when calling the entry function with a specific CPU ID. That will
change as we will allocate only as much as required for a given system
configuration. To avoid that we would then dereference some out of
bounds CPU data because of an invalid CPU ID, always perform the ID
check before using the data structure.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
driver: Rename hv_core_percpu_size to hv_core_and_percpu_size

This size is the sum of the core and the per-CPU data region.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core/driver: Rework obtaining of maximum number of CPUs

num_possible_cpus() actually counts the possible CPUs and does not
necessarily return the maximum CPU ID + 1, the value Jailhouse needs.
Fix this by deriving that value from the root cell's CPU set. Rename
the header field correspondingly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
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>