Skip to content

Commit fb257a1

Browse files
committed
Cleanup
1 parent 6c05dd5 commit fb257a1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ upload:
99
./scripts/upload.sh $(GCP_PROJECT_ID)
1010

1111
.PHONY: build-and-upload
12-
make build-and-upload: build upload
12+
build-and-upload: build upload

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
# The format will be: v<major>.<minor>.<patch>_g<commit_hash> — e.g. v1.7.2_g8bb88311
5+
# The format will be: v<major>.<minor>.<patch>_<commit_hash> — e.g. v1.7.2_8bb88311
66
# Extract full version from src/firecracker/swagger/firecracker.yaml
77
FC_VERSION=$(awk '/^info:/{flag=1} flag && /^ version:/{print $2; exit}' src/firecracker/swagger/firecracker.yaml)
88
commit_hash=$(git rev-parse --short=7 HEAD)

src/vmm/src/vstate/vm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ impl Vm {
321321
// This is the most important optimization - avoids repeated allocations
322322
let zero_buf = vec![0u8; page_size];
323323

324+
let sys_page_size = host_page_size();
325+
324326
for mapping in &mappings {
325327
// Find the memory region that matches this mapping
326328
let mem_region = guest_memory
@@ -333,7 +335,6 @@ impl Vm {
333335
let num_pages = region_size / page_size;
334336

335337
// Use mincore on the entire region to check residency
336-
let sys_page_size = host_page_size();
337338
let mincore_pages = region_size.div_ceil(sys_page_size);
338339
let mut mincore_vec = vec![0u8; mincore_pages];
339340

0 commit comments

Comments
 (0)