From c9e73a3a7203fa2df43029582541ca797258285f Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 16 Jun 2026 19:32:12 +0000 Subject: [PATCH 1/3] fix: move INITRD_MAP_BASE past LAPIC MMIO region Signed-off-by: danbugs --- host/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/host/src/lib.rs b/host/src/lib.rs index db14dc3..1733ba3 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -2282,9 +2282,11 @@ impl Sandbox { let mut usbox = UninitializedSandbox::new(env, Some(config.sandbox_config()))?; // Map the initrd file (zero-copy via mmap) - // Place at 3 GiB — high enough to not overlap any reasonable - // primary shared memory region, within the 4 GiB identity map. - const INITRD_MAP_BASE: u64 = 0xC000_0000; // 3 GiB + // Place past the x86 LAPIC MMIO page (0xFEE0_0000) so that + // large initrds (>1 GiB) don't overlap it and trigger EEXIST + // from KVM_SET_USER_MEMORY_REGION on kernels where in-kernel + // IRQCHIP reserves that range. + const INITRD_MAP_BASE: u64 = 0xFEF0_0000; if let Some(path) = initrd_path { usbox.map_file_cow(path, INITRD_MAP_BASE, Some("initrd"))?; } @@ -2527,7 +2529,7 @@ impl Sandbox { let mut inner = MultiUseSandbox::from_snapshot(arc.clone(), host_funcs, None)?; - const INITRD_MAP_BASE: u64 = 0xC000_0000; + const INITRD_MAP_BASE: u64 = 0xFEF0_0000; if let Some(ref initrd_path) = initrd { inner.map_file_cow(initrd_path, INITRD_MAP_BASE, Some("initrd"))?; } From 25d10bf7f23cbbcaf902de9dee7fdbc0cfe12498 Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 16 Jun 2026 20:16:19 +0000 Subject: [PATCH 2/3] fix: update doc comment to reflect new INITRD_MAP_BASE address Signed-off-by: danbugs --- host/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/src/lib.rs b/host/src/lib.rs index 1733ba3..d785f34 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -2469,7 +2469,7 @@ impl Sandbox { } /// Load a snapshot with an initrd file re-mapped at the standard - /// guest VA (0xC000_0000). Required when the snapshot was taken + /// guest VA (0xFEF0_0000). Required when the snapshot was taken /// from a cpiovfs-backed guest whose VFS nodes point into the /// initrd region. pub fn from_snapshot_file_with_initrd, I: AsRef>( From e06d5b6d8eb9e0381ad3bf45e35382abf6d0d0b8 Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 16 Jun 2026 20:25:35 +0000 Subject: [PATCH 3/3] fix: bump ILCompiler to 9.0.17 to match SDK 9.0-alpine Signed-off-by: danbugs --- examples/dotnet-nativeaot/HelloNativeAot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dotnet-nativeaot/HelloNativeAot.csproj b/examples/dotnet-nativeaot/HelloNativeAot.csproj index efc08c4..239f441 100644 --- a/examples/dotnet-nativeaot/HelloNativeAot.csproj +++ b/examples/dotnet-nativeaot/HelloNativeAot.csproj @@ -7,6 +7,6 @@ true - +