Skip to content

Commit cd29c64

Browse files
committed
docs: kernel policy support
Added the policy behind validating host/guest kernel versions with Firecracker. Signed-off-by: Diana Popa <[email protected]>
1 parent 77fdc6e commit cd29c64

File tree

9 files changed

+113
-11
lines changed

9 files changed

+113
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
Accepted values are either `V1` or `V2`.
3131
- Added `GET` request on `/mmds/version` that provides the MMDS version.
3232
Default value is `V2`.
33+
- Support and validation for host and guest kernel 5.10.
34+
- A [kernel support policy](docs/kernel-policy.md).
3335

3436
### Changed
3537

FAQ.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ and guest.
7070

7171
### What operating systems are supported by Firecracker?
7272

73-
Firecracker supports Linux host and guest operating systems with kernel versions
74-
4.14 and above, as well as
73+
Firecracker supports Linux host and guest operating systems as well as
7574
[OSv](http://blog.osv.io/blog/2019/04/19/making-OSv-run-on-firecraker/) guests.
76-
The long-term support plan is still under discussion.
75+
Currently supported host/guest kernel versions can be found in the
76+
[kernel support policy](docs/kernel-policy.md).
7777

7878
### What is the open source license for Firecracker?
7979

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ Firecracker currently only supports little-endian platforms. Firecracker will
141141
not compile for big-endian architectures, and will not work correctly with
142142
big-endian configured guests.
143143

144+
## Supported kernels
145+
146+
For a list of supported host/guest kernels and future kernel related
147+
plans, check out our [kernel support policy](docs/kernel-policy.md).
148+
144149
## Known issues and Limitations
145150

146151
- The [SendCtrlAltDel](docs/api_requests/actions.md#sendctrlaltdel) API request

docs/RELEASE_POLICY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ security issues when they are found, for:
5050
* any Firecracker `vMAJOR.MINOR` release for at least 6 months from release date;
5151
* for each `vMAJOR`, the latest `MINOR` for 1 year since release date;
5252

53+
Starting with release v1.0, for each major and minor release, we will
54+
also be specifying the supported kernel versions.
55+
5356
### Examples
5457

5558
1. Considering an example where the last Firecracker releases are:

docs/design.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ The following diagram depicts an example host running Firecracker microVMs.
4646
images/firecracker_host_integration.png?raw=true
4747
"Firecracker Host Integration")
4848

49-
Firecracker runs on Linux hosts with 4.14 or newer kernels and with Linux
50-
guest OSs (from this point on, referred to as guests). In production
51-
environments, Firecracker should be started only via the `jailer` binary.
49+
Firecracker runs on Linux hosts and with Linux guest OSs (from this point on,
50+
referred to as guests). For a complete list of currently supported kernel
51+
versions, check out the [kernel support policy](kernel-policy.md).
52+
53+
In production environments, Firecracker should be started only via the `jailer` binary.
5254
See [Sandboxing](#Sandboxing) for more details.
5355

5456
After launching the process, users interact with the Firecracker API to

docs/getting-started.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Prerequisites
1414

15-
If you need an opinionated way of running Firecracker, create an `i3.metal`
15+
If you need an opinionated way of running Firecracker, launch an `i3.metal`
1616
instance using Ubuntu 18.04 on EC2. Firecracker uses
1717
[KVM](https://www.linux-kvm.org) and needs read/write access that can be
1818
granted as shown below:
@@ -23,11 +23,10 @@ sudo setfacl -m u:${USER}:rw /dev/kvm
2323

2424
The generic requirements are explained below:
2525

26-
- **Linux 4.14+**
26+
- **Linux**
2727

2828
Firecracker currently supports physical Linux **x86_64** and **aarch64**
29-
hosts, running kernel version 4.14 or later. However, the **aarch64** support
30-
is not feature complete (alpha stage).
29+
hosts. The currently supported kernel versions can be found [here](kernel-policy.md).
3130

3231
- **KVM**
3332

docs/kernel-policy.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Firecracker's Kernel Support Policy
2+
3+
Being a virtual machine monitor, Firecracker represents a component in a
4+
larger stack, one in which it is tightly coupled with the guest and host
5+
kernels on which it is run. The presented kernel support policy aims at
6+
offering customers predictability into future kernel related changes.
7+
8+
As of right now, Firecracker code from main branch is being validated
9+
continuously on *4.14* and *5.10* host and guest kernels. While other
10+
versions and other kernel configs might work, they are not periodically
11+
validated in our test suite, and using them might result in unexpected behaviour.
12+
Once enabled, a kernel version is supported for a **minimum of 2 years**.
13+
14+
We are validating the currently supported Firecracker releases as per
15+
[Firecracker’s release policy](../docs/RELEASE_POLICY.md).
16+
Starting with release `v1.0` each major and minor release will specify
17+
the supported kernel versions. Adding support for a new kernel version
18+
will result in a Firecracker release only if compatibility changes are
19+
required.
20+
21+
The currently supported kernel versions can be seen in the table below.
22+
Based on our user requests, every year we are considering for enablement
23+
the latest LTS version.
24+
25+
<table>
26+
<tr>
27+
<th></th>
28+
<th>2022</th>
29+
</tr>
30+
<tr>
31+
<td>4.14</td>
32+
<td style="background-color:mediumseagreen">full support</td>
33+
</tr>
34+
<tr>
35+
<td>5.10</td>
36+
<td style="background-color:mediumseagreen">full support</td>
37+
</tr>
38+
</table>
39+
40+
The guest kernel configs used in our validation pipelines
41+
can be found [here](../resources/guest_configs/) while a breakdown
42+
of the relevant guest kernel modules can be found in the next section.
43+
44+
## Guest kernel modules
45+
46+
Below is a per-functionality breakdown of guest kernel modules
47+
relevant to Firecracker for all platforms:
48+
49+
* serial console - `CONFIG_SERIAL_8250_CONSOLE`, `CONFIG_PRINTK`
50+
* initrd support - `CONFIG_BLK_DEV_INITRD`
51+
* virtio devices - `CONFIG_VIRTIO_MMIO`
52+
* balloon - `CONFIG_MEMORY_BALLOON`, `CONFIG_VIRTIO_BALLOON`
53+
* block - `CONFIG_VIRTIO_BLK`
54+
* partuuid support - `CONFIG_MSDOS_PARTITION`
55+
* network - `CONFIG_VIRTIO_NET`
56+
* vsock - `CONFIG_VIRTIO_VSOCKETS`
57+
58+
There are also guest config options which are dependant on the platform
59+
on which Firecracker is run:
60+
61+
### ARM
62+
63+
* timekeeping - `CONFIG_ARM_AMBA`, `CONFIG_RTC_DRV_PL031`
64+
65+
### x86_64
66+
67+
* timekeeping - `CONFIG_KVM_GUEST` (which enables CONFIG_KVM_CLOCK)
68+
* high precision timekeeping - `CONFIG_PTP_1588_CLOCK`, `CONFIG_PTP_1588_CLOCK_KVM`
69+
* external clean shutdown - `CONFIG_SERIO_I8042`, `CONFIG_KEYBOARD_ATKBD`
70+
* virtio devices - `CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES`
71+
72+
#### Minimal boot requirements
73+
74+
Depending on the source of boot (either from a block device or from an initrd),
75+
the minimally required guest kernel modules for a successful microVM boot are:
76+
77+
* Booting with initrd:
78+
* `CONFIG_BLK_DEV_INITRD`
79+
* For aarch64, you also need `CONFIG_VIRTIO_MMIO` (for the serial device).
80+
* For x86_64, you also need `CONFIG_KVM_GUEST`.
81+
82+
* Booting with root block device:
83+
* `CONFIG_VIRTIO_BLK`
84+
* For x86_64, you also need `CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES` and `CONFIG_KVM_GUEST`.
85+
86+
If you wish to enable boot logs, make sure to also add
87+
`CONFIG_SERIAL_8250_CONSOLE` and `CONFIG_PRINTK` to the guest kernel config.
88+

docs/prod-host-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ spec_store_bypass_disable=seccomp
373373
which will apply SSB if seccomp is enabled by Firecracker.
374374

375375
On aarch64 systems, it is enabled by Firecracker
376-
[using the `prctl` interface][3]. However, this is only availabe on host
376+
[using the `prctl` interface][3]. However, this is only available on host
377377
kernels Linux >=4.17 and also Amazon Linux 4.14. Alternatively, a global
378378
mitigation can be enabled by adding the following Linux kernel boot parameter:
379379

docs/rootfs-and-kernel-setup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ can boot:
5050
1. Upon a successful build, you can find the kernel image under `./vmlinux`
5151
(for x86) or `./arch/arm64/boot/Image` (for aarch64).
5252

53+
For a list of currently supported kernel versions, check out the
54+
[kernel support policy](kernel-policy.md).
55+
5356
### Use the provided recipe
5457

5558
The kernel images used in our CI to test Firecracker's features are obtained by

0 commit comments

Comments
 (0)