public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] x86: Add support for running as secondary Jailhouse guest
@ 2017-11-27  8:11 Jan Kiszka
  2017-11-27  8:11 ` [PATCH v2 01/12] x86/apic: Install an empty physflat_init_apic_ldr Jan Kiszka
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Jan Kiszka @ 2017-11-27  8:11 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin
  Cc: x86, Linux Kernel Mailing List, jailhouse-dev

This series paves the way to run Linux in so-called non-root cells
(guest partitions) of the Jailhouse hypervisor.

Jailhouse [1] was started 4 years ago as an open-source (GPL) leight-
weight hypervisor that statically partitions SMP systems. It's unique in
that it uses one Linux instance, the root cell, as boot loader and
management console. Jailhouse targets use cases for hard real-time and
safety-critical systems that KVM cannot cater due to its inherent
complexity.

Jaihouse can run bare-metal, free and closed-source RTOSes as secondary
guests and, with this series, also x86 Linux instances. While ARM and
ARM64 non-root Linux guests are feasible without extra patches, thanks
to the high configurability via device trees, x86 requires special
platform support, mostly to step away from non-existing resources in a
non-root Jailhouse cell. These differences are:

- no legacy devices such as PIC, PIT, RTC/CMOS, i8042
- no HPET
- no ACPI, no other BIOS services; platform information is provided
  from hypervisor config
- APIC and IOAPIC (if any) are available at fixed MMIO addresses and
  the APIC is limited to flat physical mode
- no complete PCI topology
- no restart supported
- use precalibrated TSC and APIC timer frequencies

This series ensures that Linux can boot in a non-root cell, including
SMP cells, has working timekeeping and can use the platform UARTs and
PCI devices as assigned to it. In follow-up series, we will propose
optimizations and enhancements for the PCI support, a simplistic debug
console, and some improvement for Linux guests on ARM.

What is not yet in upstream-ready state is a driver for inter-cell
communication. The current implementation of virtual peer-to-peer
network [2] uses an enhanced version of the QEMU ivshmem shared memory
device. However we still need to finish the evaluation of virtio /
vhost-pci options prior to settling over the final interface.

This patch series is also available at

git://git.kiszka.org/linux.git e8d19494b96b

Changes in v2:
 - removed calibration in favor of static values now passed from boot
   loader
 - refactored hypervisor platform setup according to feedback,
   specifically
    - proper switch to x2APIC ops
    - APIC and IOAPIC registration from x86_init.mpparse.get_smp_config
    - PCI setup from x86_init.pci.arch_init
 - disabled i8042 devices
 - control of warm reset setup via platform feature flag
 - proper walk of setup data linked list
 - decoupled CONFIG_JAILHOUSE from CONFIG_PARAVIRT
 - fixed IOAPIC routing setup for UARTs (trigger and polarity set)
 - symbolic irqflag values in MP config tables

Jan

[1] http://jailhouse-project.org
[2] http://git.kiszka.org/?p=linux.git;a=shortlog;h=refs/heads/queues/jailhouse

Jan Kiszka (12):
  x86/apic: Install an empty physflat_init_apic_ldr
  x86: Control warm reset setup via legacy feature flag
  x86: Introduce and use MP IRQ trigger and polarity defines
  x86/jailhouse: Add infrastructure for running in non-root cell
  x86/jailhouse: Enable APIC and SMP support
  x86/jailhouse: Enable PMTIMER
  x86/jailhouse: Set up timekeeping
  x86/jailhouse: Avoid access of unsupported platform resources
  x86/jailhouse: Silence ACPI warning
  x86/jailhouse: Halt instead of failing to restart
  x86/jailhouse: Wire up IOAPIC for legacy UART ports
  x86/jailhouse: Initialize PCI support

 arch/x86/Kconfig                      |   9 ++
 arch/x86/include/asm/hypervisor.h     |   1 +
 arch/x86/include/asm/jailhouse_para.h |  27 +++++
 arch/x86/include/asm/mpspec_def.h     |  14 ++-
 arch/x86/include/asm/x86_init.h       |   1 +
 arch/x86/include/uapi/asm/bootparam.h |  22 ++++
 arch/x86/kernel/Makefile              |   2 +
 arch/x86/kernel/apic/apic_flat_64.c   |  16 ++-
 arch/x86/kernel/apic/io_apic.c        |  20 ++--
 arch/x86/kernel/apic/x2apic_uv_x.c    |   1 +
 arch/x86/kernel/cpu/hypervisor.c      |   4 +
 arch/x86/kernel/jailhouse.c           | 205 ++++++++++++++++++++++++++++++++++
 arch/x86/kernel/mpparse.c             |  23 ++--
 arch/x86/kernel/platform-quirks.c     |   1 +
 arch/x86/kernel/smpboot.c             |   4 +-
 arch/x86/platform/intel-mid/sfi.c     |   5 +-
 drivers/acpi/Kconfig                  |  32 +++---
 17 files changed, 341 insertions(+), 46 deletions(-)
 create mode 100644 arch/x86/include/asm/jailhouse_para.h
 create mode 100644 arch/x86/kernel/jailhouse.c

-- 
2.12.3

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2018-01-23  7:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27  8:11 [PATCH v2 00/12] x86: Add support for running as secondary Jailhouse guest Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 01/12] x86/apic: Install an empty physflat_init_apic_ldr Jan Kiszka
2018-01-14 20:34   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 02/12] x86: Control warm reset setup via legacy feature flag Jan Kiszka
2018-01-14 20:34   ` [tip:x86/platform] x86/platform: " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 03/12] x86: Introduce and use MP IRQ trigger and polarity defines Jan Kiszka
2018-01-14 20:34   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 04/12] x86/jailhouse: Add infrastructure for running in non-root cell Jan Kiszka
2018-01-14 20:35   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 05/12] x86/jailhouse: Enable APIC and SMP support Jan Kiszka
2018-01-14 20:36   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 06/12] x86/jailhouse: Enable PMTIMER Jan Kiszka
2018-01-14 20:36   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 07/12] x86/jailhouse: Set up timekeeping Jan Kiszka
2018-01-14 20:37   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 08/12] x86/jailhouse: Avoid access of unsupported platform resources Jan Kiszka
2018-01-14 20:37   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 09/12] x86/jailhouse: Silence ACPI warning Jan Kiszka
2018-01-14 20:37   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 10/12] x86/jailhouse: Halt instead of failing to restart Jan Kiszka
2018-01-14 20:38   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 11/12] x86/jailhouse: Wire up IOAPIC for legacy UART ports Jan Kiszka
2018-01-14 20:38   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2017-11-27  8:11 ` [PATCH v2 12/12] x86/jailhouse: Initialize PCI support Jan Kiszka
2018-01-14 20:39   ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-01-22 22:26   ` [PATCH v2 12/12] " Bjorn Helgaas
2018-01-23  7:49     ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox