Skip to content

Commit 7cc8229

Browse files
authored
Merge branch 'main' into feat/kvm_clock_ctr_gdb
2 parents e63a17f + a2a3484 commit 7cc8229

File tree

16 files changed

+53
-127
lines changed

16 files changed

+53
-127
lines changed

Cargo.lock

Lines changed: 21 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/hugepages.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Backing Guest Memory by Huge Pages
22

3-
> [!WARNING]
4-
>
5-
> Support is currently in **developer preview**. See
6-
> [this section](RELEASE_POLICY.md#developer-preview-features) for more info.
7-
83
Firecracker supports backing the guest memory of a VM by 2MB hugetlbfs pages.
94
This can be enabled by setting the `huge_pages` field of `PUT` or `PATCH`
105
requests to the `/machine-config` endpoint to `2M`.
@@ -44,7 +39,6 @@ Currently, hugetlbfs support is mutually exclusive with the following
4439
Firecracker features:
4540

4641
- Memory Ballooning via the [Balloon Device](./ballooning.md)
47-
- Initrd
4842

4943
## FAQ
5044

src/clippy-tracing/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ name = "clippy-tracing"
1010
bench = false
1111

1212
[dependencies]
13-
clap = { version = "4.5.26", features = ["derive"] }
13+
clap = { version = "4.5.27", features = ["derive"] }
1414
itertools = "0.14.0"
1515
proc-macro2 = { version = "1.0.93", features = ["span-locations"] }
1616
quote = "1.0.38"
1717
syn = { version = "2.0.96", features = ["full", "extra-traits", "visit", "visit-mut", "printing"] }
1818
walkdir = "2.5.0"
1919

2020
[dev-dependencies]
21-
uuid = { version = "1.12.0", features = ["v4"] }
21+
uuid = { version = "1.12.1", features = ["v4"] }
2222

2323
[lints]
2424
workspace = true

src/cpu-template-helper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "cpu-template-helper"
1010
bench = false
1111

1212
[dependencies]
13-
clap = { version = "4.5.26", features = ["derive", "string"] }
13+
clap = { version = "4.5.27", features = ["derive", "string"] }
1414
displaydoc = "0.2.5"
1515
libc = "0.2.169"
1616
log-instrument = { path = "../log-instrument", optional = true }

src/seccompiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bench = false
1717

1818
[dependencies]
1919
bincode = "1.2.1"
20-
clap = { version = "4.5.23", features = ["derive", "string"] }
20+
clap = { version = "4.5.27", features = ["derive", "string"] }
2121
displaydoc = "0.2.5"
2222
libc = "0.2.169"
2323
serde = { version = "1.0.217", features = ["derive"] }

src/snapshot-editor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "snapshot-editor"
1010
bench = false
1111

1212
[dependencies]
13-
clap = { version = "4.5.26", features = ["derive", "string"] }
13+
clap = { version = "4.5.27", features = ["derive", "string"] }
1414
displaydoc = "0.2.5"
1515

1616
fc_utils = { package = "utils", path = "../utils" }

src/vmm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bench = false
1212
acpi_tables = { path = "../acpi-tables" }
1313
aes-gcm = { version = "0.10.1", default-features = false, features = ["aes"] }
1414
arrayvec = { version = "0.7.6", optional = true }
15-
aws-lc-rs = { version = "1.12.1", features = ["bindgen"] }
15+
aws-lc-rs = { version = "1.12.2", features = ["bindgen"] }
1616
base64 = "0.22.1"
1717
bincode = "1.2.1"
1818
bitflags = "2.8.0"

src/vmm/src/devices/virtio/queue.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,11 @@ mod verification {
803803
const GUEST_MEMORY_BASE: u64 = 512;
804804

805805
// We size our guest memory to fit a properly aligned queue, plus some wiggles bytes
806-
// to make sure we not only test queues where all segments are consecutively aligned.
806+
// to make sure we not only test queues where all segments are consecutively aligned (at least
807+
// for those proofs that use a completely arbitrary queue structure).
807808
// We need to give at least 16 bytes of buffer space for the descriptor table to be
808809
// able to change its address, as it is 16-byte aligned.
809-
const GUEST_MEMORY_SIZE: usize = QUEUE_END as usize + 30;
810+
const GUEST_MEMORY_SIZE: usize = (QUEUE_END - QUEUE_BASE_ADDRESS) as usize + 30;
810811

811812
fn guest_memory(memory: *mut u8) -> ProofGuestMemory {
812813
// Ideally, we'd want to do
@@ -876,8 +877,7 @@ mod verification {
876877
const USED_RING_BASE_ADDRESS: u64 =
877878
AVAIL_RING_BASE_ADDRESS + 6 + 2 * FIRECRACKER_MAX_QUEUE_SIZE as u64 + 2;
878879

879-
/// The address of the first byte after the queue. Since our queue starts at guest physical
880-
/// address 0, this is also the size of the memory area occupied by the queue.
880+
/// The address of the first byte after the queue (which starts at QUEUE_BASE_ADDRESS).
881881
/// Note that the used ring structure has size 6 + 8 * FIRECRACKER_MAX_QUEUE_SIZE
882882
const QUEUE_END: u64 = USED_RING_BASE_ADDRESS + 6 + 8 * FIRECRACKER_MAX_QUEUE_SIZE as u64;
883883

src/vmm/src/resources.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
99

1010
use crate::cpu_config::templates::CustomCpuTemplate;
1111
use crate::device_manager::persist::SharedDeviceType;
12-
use crate::logger::{info, log_dev_preview_warning};
12+
use crate::logger::info;
1313
use crate::mmds;
1414
use crate::mmds::data_store::{Mmds, MmdsVersion};
1515
use crate::mmds::ns::MmdsNetworkStack;
@@ -246,10 +246,6 @@ impl VmResources {
246246
&mut self,
247247
update: &MachineConfigUpdate,
248248
) -> Result<(), MachineConfigError> {
249-
if update.huge_pages.is_some() && update.huge_pages != Some(HugePageConfig::None) {
250-
log_dev_preview_warning("Huge pages support", None);
251-
}
252-
253249
let updated = self.machine_config.update(update)?;
254250

255251
// The VM cannot have a memory size smaller than the target size
@@ -268,13 +264,6 @@ impl VmResources {
268264
if self.balloon.get().is_some() && updated.huge_pages != HugePageConfig::None {
269265
return Err(MachineConfigError::BalloonAndHugePages);
270266
}
271-
272-
if self.boot_source.config.initrd_path.is_some()
273-
&& updated.huge_pages != HugePageConfig::None
274-
{
275-
return Err(MachineConfigError::InitrdAndHugePages);
276-
}
277-
278267
self.machine_config = updated;
279268

280269
Ok(())
@@ -341,12 +330,6 @@ impl VmResources {
341330
&mut self,
342331
boot_source_cfg: BootSourceConfig,
343332
) -> Result<(), BootSourceConfigError> {
344-
if boot_source_cfg.initrd_path.is_some()
345-
&& self.machine_config.huge_pages != HugePageConfig::None
346-
{
347-
return Err(BootSourceConfigError::HugePagesAndInitRd);
348-
}
349-
350333
self.boot_source = BootSource {
351334
builder: Some(BootConfig::new(&boot_source_cfg)?),
352335
config: boot_source_cfg,

src/vmm/src/vmm_config/boot_source.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ pub enum BootSourceConfigError {
4242
InvalidInitrdPath(io::Error),
4343
/// The kernel command line is invalid: {0}
4444
InvalidKernelCommandLine(String),
45-
/// Firecracker's huge pages support is incompatible with initrds.
46-
HugePagesAndInitRd,
4745
}
4846

4947
/// Holds the kernel specification (both configuration as well as runtime details).

0 commit comments

Comments
 (0)