x86: Obtain DMAR unit addresses from system configuration

This removes the last ACPI user and simplifies the hypervisor code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core/configs/tools: Remove ACPI support from hypervisor

The is no more user of the APCI table lookup. Remove this code as well
as the config memory region in the configuration files. Update the
config generator accordingly.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
x86: Use union for MSI address & data encoding/decoding

We will work more intensively with MSIs. Encoding the address and data
word fields as a union with bit fields will simplify those tasks. For
now we can already exploit this in vtd_init_fault_nmi.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Enforce online CPUs == expected CPUs

No longer allow the hypervisor to start with less than the number of
expected CPUs. This prevents that we leave (known) CPUs under native
control after the hypervisor started.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Adjust max_cpu_id calculation in cell_init

No need to set the limit to what we can hold in the bitmap. The limit is
better defined by the cpu set size in the config file. This not only
simplifies the code but also shortens cpu set iterations.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Fold register_root_cpu into caller

Nothing to gain by keeping this in a function.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Reorder root cell init and arch_init_early

The latter will depend on the former while there is no dependency the
other way around.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
x86: Privatize IOAPIC defines

They are not part of the IOAPIC subsystem interface.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
x86: Fold ioapic_root_cell_shrink into ioapic_cell_init

One IOAPIC interface less to care about.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: config-create: locate templates next to script or in given dir

When the script was called from outside the tools dir the templates
could not be found.
This patch assumes the templates are next to the script, one can also
specify a path.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools: config-create: use os.path.join to construct filenames

Use os.path.join instead of + '/'. The script is Linux only but it is
still cleaner.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
configs/tools: Add number of MSI vectors to PCI device config structure

This avoids having to scan in the hypervisor the MSI/MSI-X capabilities
regarding the maximum number of vectors a PCI device may use.

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