Skip to content

Commit 57ea0a3

Browse files
ShadowCurseManciukic
authored andcommitted
chore: use GitHub syntax for notes
Instead of **Note** syntax we can use GitHub version [!NOTE] to have a better visuals. Signed-off-by: Egor Lazarchuk <[email protected]>
1 parent 92c8e56 commit 57ea0a3

File tree

11 files changed

+230
-163
lines changed

11 files changed

+230
-163
lines changed

docs/api_requests/actions.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ i8042 controller. Driver support for both these devices needs to be present in
4444
the guest OS. For Linux, that means the guest kernel needs `CONFIG_SERIO_I8042`
4545
and `CONFIG_KEYBOARD_ATKBD`.
4646

47-
**Note1**: at boot time, the Linux driver for i8042 spends a few tens of
48-
milliseconds probing the device. This can be disabled by using these kernel
49-
command line parameters:
50-
51-
```console
52-
i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd
53-
```
47+
> [!NOTE]
48+
>
49+
> At boot time, the Linux driver for i8042 spends a few tens of milliseconds
50+
> probing the device. This can be disabled by using these kernel command line
51+
> parameters:
52+
>
53+
> ```console
54+
> i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd
55+
> ```
5456
5557
### SendCtrlAltDel Example
5658

docs/api_requests/block-io-engine.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ with the `io_engine` field taking two possible values:
2525
The `Sync` variant is the default, in order to provide backwards compatibility
2626
with older Firecracker versions.
2727

28-
**Note** [vhost-user block device](./block-vhost-user.md) is another option for
29-
block IO that requires an external backend process.
28+
> [!NOTE]
29+
>
30+
> [vhost-user block device](./block-vhost-user.md) is another option for block
31+
> IO that requires an external backend process.
3032
3133
## Example configuration
3234

docs/api_requests/block-vhost-user.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,11 @@ potential for the guest to exercise issues in the backend codebase to trigger
154154
undesired behaviours. Users should consider running their backend in a jailer or
155155
applying other adequate security measures to restrict it.
156156

157-
**Note** [Firecracker jailer](../jailer.md) is currently only capable of running
158-
Firecracker as the binary. Vhost-user block device users are expected to use
159-
another jailer to run the backend.
157+
> [!NOTE]
158+
>
159+
> [Firecracker jailer](../jailer.md) is currently only capable of running
160+
> Firecracker as the binary. Vhost-user block device users are expected to use
161+
> another jailer to run the backend.
160162
161163
It is also recommended to use proactive security measures like running a
162164
Virtio-level fuzzer in the guest during testing to make sure that the backend
@@ -221,12 +223,16 @@ curl --unix-socket ${fc_socket} -i \
221223
}"
222224
```
223225

224-
**Note** Unlike Virtio block device, there is no way to configure a `readonly`
225-
vhost-user drive on the Firecracker side. Instead, this configuration belongs to
226-
the backend. Whenever the backend advertises the `VIRTIO_BLK_F_RO` feature,
227-
Firecracker will accept it, and the device will act as readonly.
226+
> [!NOTE]
227+
>
228+
> Unlike Virtio block device, there is no way to configure a `readonly`
229+
> vhost-user drive on the Firecracker side. Instead, this configuration belongs
230+
> to the backend. Whenever the backend advertises the `VIRTIO_BLK_F_RO` feature,
231+
> Firecracker will accept it, and the device will act as readonly.
228232
229-
**Note** Whenever a `PUT` request is sent to the `/drives` endpoint for a
230-
vhost-user device with the `id` that already exists, Firecracker will close the
231-
existing connection to the backend and will open a new one. Users may need to
232-
restart their backend if they do so.
233+
> [!NOTE]
234+
>
235+
> Whenever a `PUT` request is sent to the `/drives` endpoint for a vhost-user
236+
> device with the `id` that already exists, Firecracker will close the existing
237+
> connection to the backend and will open a new one. Users may need to restart
238+
> their backend if they do so.

docs/api_requests/patch-network-interface.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ Accept: application/json
5858
The full specification of the data structures available for this call can be
5959
found in our [OpenAPI spec](../../src/firecracker/swagger/firecracker.yaml).
6060

61-
**Note**: The data provided for the update is merged with the existing data. In
62-
the above example, the RX rate limit is updated, but the TX rate limit remains
63-
unchanged.
61+
> [!NOTE]
62+
>
63+
> The data provided for the update is merged with the existing data. In the
64+
> above example, the RX rate limit is updated, but the TX rate limit remains
65+
> unchanged.
6466
6567
## Removing Rate Limiting
6668

docs/cpu_templates/cpu-template-helper.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ process as Firecacker and capturing them in the state just before booting a
3838
guest. More details about the preboot process can be found
3939
[here](boot-protocol.md) and [here](cpuid-normalization.md).
4040

41-
> **Note** Some MSRs and ARM registers are not included in the output, since
42-
> they are not reasonable to modify with CPU templates. The full list of them
43-
> can be found in [Appendix](#appendix).
44-
45-
> **Note** Since the output depends on underlying hardware and software stack
46-
> (BIOS, CPU, kernel, Firecracker), it is required to dump guest CPU
47-
> configuration on each combination when creating a custom CPU template
48-
> targetting them all.
41+
> [!NOTE]
42+
>
43+
> Some MSRs and ARM registers are not included in the output, since they are not
44+
> reasonable to modify with CPU templates. The full list of them can be found in
45+
> [Appendix](#appendix).
46+
47+
> [!NOTE]
48+
>
49+
> Since the output depends on underlying hardware and software stack (BIOS, CPU,
50+
> kernel, Firecracker), it is required to dump guest CPU configuration on each
51+
> combination when creating a custom CPU template targeting them all.
4952
5053
#### Strip command
5154

@@ -85,9 +88,11 @@ When a template is specified both through `--template` and in Firecracker
8588
configuration file provided via `--config`, the template specified with
8689
`--template` takes precedence.
8790

88-
> **Note** This command does not ensure that the contents of the template are
89-
> sensible. Thus, users need to make sure that the template does not have any
90-
> inconsistent entries and does not crash guests.
91+
> [!NOTE]
92+
>
93+
> This command does not ensure that the contents of the template are sensible.
94+
> Thus, users need to make sure that the template does not have any inconsistent
95+
> entries and does not crash guests.
9196
9297
### Fingerprint-related commands
9398

@@ -177,9 +182,11 @@ CPU features to a heterogeneous fleet consisting of multiple CPU models.
177182
revisions to the CPU template, and replace the fingerprint file with the new
178183
one.
179184

180-
> **Note** It is recommended to review the update process of the underlying
181-
> stack on your infrastructure. This can help identify points that may require
182-
> the above validation check.
185+
> [!NOTE]
186+
>
187+
> It is recommended to review the update process of the underlying stack on your
188+
> infrastructure. This can help identify points that may require the above
189+
> validation check.
183190
184191
## Appendix
185192

docs/cpu_templates/cpu-templates.md

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ guest. A real world use case for this is representing a heterogeneous fleet (a
1616
fleet consisting of multiple CPU models) as a homogeneous fleet, so the guests
1717
will experience a consistent feature set supported by the host.
1818

19-
> **Note** Representing one CPU vendor as another CPU vendor is not supported.
20-
21-
> **Note** CPU templates shall not be used as a security protection against
22-
> malicious guests. Disabling a feature in a CPU template does not generally
23-
> make it completely unavailable to the guest. For example, disabling a feature
24-
> related to an instruction set will indicate to the guest that the feature is
25-
> not supported, but the guest may still be able to execute corresponding
19+
> [!NOTE]
20+
>
21+
> Representing one CPU vendor as another CPU vendor is not supported.
22+
23+
> [!NOTE]
24+
>
25+
> CPU templates shall not be used as a security protection against malicious
26+
> guests. Disabling a feature in a CPU template does not generally make it
27+
> completely unavailable to the guest. For example, disabling a feature related
28+
> to an instruction set will indicate to the guest that the feature is not
29+
> supported, but the guest may still be able to execute corresponding
2630
> instructions if it does not obey the feature bit.
2731
2832
Firecracker supports two types of CPU templates:
@@ -32,15 +36,19 @@ Firecracker supports two types of CPU templates:
3236
- Custom CPU templates - users can create their own CPU templates in json format
3337
and pass them to Firecracker
3438

35-
> **Note** Static CPU templates are deprecated starting from v1.5.0 and will be
36-
> removed in accordance with our deprecation policy. Even after the removal,
37-
> custom CPU templates are available as an improved iteration of static CPU
38-
> templates. For more information about the transition from static CPU templates
39-
> to custom CPU templates, please refer to
39+
> [!NOTE]
40+
>
41+
> Static CPU templates are deprecated starting from v1.5.0 and will be removed
42+
> in accordance with our deprecation policy. Even after the removal, custom CPU
43+
> templates are available as an improved iteration of static CPU templates. For
44+
> more information about the transition from static CPU templates to custom CPU
45+
> templates, please refer to
4046
> [this GitHub discussion](https://github.com/firecracker-microvm/firecracker/discussions/4135).
4147
42-
> **Note** CPU templates for ARM (both static and custom) require the following
43-
> patch to be available in the host kernel:
48+
> [!NOTE]
49+
>
50+
> CPU templates for ARM (both static and custom) require the following patch to
51+
> be available in the host kernel:
4452
> [Support writable CPU ID registers from userspace](https://lore.kernel.org/kvm/[email protected]/#t).
4553
> Otherwise KVM will fail to write to the ARM registers.
4654
@@ -104,21 +112,27 @@ curl --unix-socket /tmp/firecracker.socket -i \
104112
Users can create their own CPU templates by creating a json file containing
105113
modifiers for CPUID, MSRs or ARM registers.
106114

107-
> **Note** Creating custom CPU templates requires expert knowledge of CPU
108-
> architectures. Custom CPU templates must be tested thoroughly before use in
109-
> production. An inappropriate configuration may lead to guest crashes or making
110-
> guests vulnerable to security attacks. For example, if a CPU template signals
111-
> a hardware vulnerability mitigation to the guest while the mitigation is in
112-
> fact not supported by the hardware, the guest may decide to disable
113-
> corresponding software mitigations which will make the guest vulnerable.
114-
115-
> **Note** Having MSRs or ARM registers in the custom CPU template does not
116-
> affect access permissions that guests will have to those registers. The access
117-
> control is handled by KVM and is not influenced by CPU templates.
118-
119-
> **Note** When setting guest configuration, KVM may reject setting some bits
120-
> quietly. This is user's responsibility to make sure that their custom CPU
121-
> template is applied as expected even if Firecracker does not report an error.
115+
> [!NOTE]
116+
>
117+
> Creating custom CPU templates requires expert knowledge of CPU architectures.
118+
> Custom CPU templates must be tested thoroughly before use in production. An
119+
> inappropriate configuration may lead to guest crashes or making guests
120+
> vulnerable to security attacks. For example, if a CPU template signals a
121+
> hardware vulnerability mitigation to the guest while the mitigation is in fact
122+
> not supported by the hardware, the guest may decide to disable corresponding
123+
> software mitigations which will make the guest vulnerable.
124+
125+
> [!NOTE]
126+
>
127+
> Having MSRs or ARM registers in the custom CPU template does not affect access
128+
> permissions that guests will have to those registers. The access control is
129+
> handled by KVM and is not influenced by CPU templates.
130+
131+
> [!NOTE]
132+
>
133+
> When setting guest configuration, KVM may reject setting some bits quietly.
134+
> This is user's responsibility to make sure that their custom CPU template is
135+
> applied as expected even if Firecracker does not report an error.
122136
123137
In order to assist with creation and usage of CPU templates, there exists a CPU
124138
template helper tool. More details can be found [here](cpu-template-helper.md).
@@ -216,8 +230,10 @@ the
216230
The full description of the custom CPU templates language can be found
217231
[here](schema.json).
218232

219-
> **Note** You can also use `_` to visually separate parts of a bitmap. So
220-
> instead of writing: `0b0000xxxx`, it can be `0b0000_xxxx`.
233+
> [!NOTE]
234+
>
235+
> You can also use `_` to visually separate parts of a bitmap. So instead of
236+
> writing: `0b0000xxxx`, it can be `0b0000_xxxx`.
221237
222238
#### Expansion of contracted bitmaps
223239

docs/kernel-policy.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ years**. At least 2 major guest and host versions will be supported at any time.
1414
When support is added for a third kernel version, the oldest will be deprecated
1515
and removed in a following release, after its minimum end of support date.
1616

17-
**Note** While other versions and other kernel configs might work, they are not
18-
periodically validated in our test suite, and using them might result in
19-
unexpected behaviour. Starting with release `v1.0` each major and minor release
20-
will specify the supported kernel versions.
17+
> [!NOTE]
18+
>
19+
> While other versions and other kernel configs might work, they are not
20+
> periodically validated in our test suite, and using them might result in
21+
> unexpected behaviour. Starting with release `v1.0` each major and minor
22+
> release will specify the supported kernel versions.
2123
2224
### Host Kernel
2325

@@ -116,8 +118,10 @@ configurations for the guest kernel are:
116118
- `CONFIG_ACPI=y`
117119
- `CONFIG_PCI=y`
118120

119-
Please note that Firecracker does not support PCI devices. The `CONFIG_PCI`
120-
option is needed for ACPI initialization inside the guest.
121+
> [!NOTE]
122+
>
123+
> Firecracker does not support PCI devices. The `CONFIG_PCI` option is needed
124+
> for ACPI initialization inside the guest.
121125
122126
ACPI supersedes the legacy way of booting a microVM, i.e. via MPTable and
123127
command line parameters for VirtIO devices.

0 commit comments

Comments
 (0)