x86/jailhouse: Enable APIC and SMP support
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 27 Nov 2017 08:11:47 +0000 (09:11 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 14 Jan 2018 20:11:55 +0000 (21:11 +0100)
commit11c8dc419bbc7b5acef812043feefc53c45ef558
treeecd778bfebf7fca260fe364cf1992f973329ef3f
parent4a362601baa6fff92b576d85199f1948cec2fb3b
x86/jailhouse: Enable APIC and SMP support

Register the APIC which Jailhouse always exposes at 0xfee00000 if in
xAPIC mode or via MSRs as x2APIC. The latter is only available if it was
already activated because there is no support for switching its mode
during runtime.

Jailhouse requires the APIC to be operated in phys-flat mode. Ensure
that this mode is selected by Linux.

The available CPUs are taken from the setup data structure that the
loader filled and registered with the kernel.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: jailhouse-dev@googlegroups.com
Link: https://lkml.kernel.org/r/8b2255da0a9856c530293a67aa9d6addfe102a2b.1511770314.git.jan.kiszka@siemens.com
arch/x86/kernel/apic/apic_flat_64.c
arch/x86/kernel/jailhouse.c