wirenboard-agent-vm/Cargo.toml
Evgeny Boger a850ec8edb Merge irq-multi-mount: lift --mount cap from ~11 to ~100+ on x86_64
Two coordinated changes that together raise the per-sandbox virtio
device cap on x86_64 by ~10x:

1. Enable msb_krun's userspace split irqchip in the runtime
   (vendor/microsandbox bump). Lifts the libkrun virtio-IRQ allocator
   ceiling from IRQ 15 (KVM in-kernel IOAPIC, 24 pins) to IRQ 223
   (userspace IOAPIC, 256 pins). Requires the wirenboard/libkrun fork
   (pinned in Cargo.toml [patch.crates-io] at 38e46f2) with three
   correctness fixes on top of upstream msb_krun 0.1.13.

2. Patch libkrunfw to bump x86 COMMAND_LINE_SIZE 2048 → 16384.
   New `libkrunfw-overrides/cmdline-size_x86_64.patch` lifts the cap
   so the assembled cmdline (~36 bytes per virtio_mmio device) doesn't
   silently truncate past ~10 user mounts.

CI workflow hardening that landed alongside:
 - Cache key now keyed per-arch (an aarch64 patch edit no longer
   invalidates the x86_64 cache).
 - `config-libkrunfw*` skip pattern uses a bare suffix so future
   `config-libkrunfw-tdx_${ARCH}.patch` / `-sev_` variants are also
   excluded from the kernel source-patch pipeline.

User-facing knobs (`--mount` doc in run.rs, README troubleshooting,
ARCHITECTURE/PLAN narrative) updated to reflect the new ceiling.
2026-05-28 14:30:53 +00:00

55 lines
2.7 KiB
TOML

[workspace]
resolver = "3"
members = ["crates/agent-vm"]
# microsandbox declares its own workspace under vendor/; keep it separate
# so Cargo doesn't try to absorb it into ours.
exclude = ["vendor/microsandbox"]
[workspace.package]
version = "0.1.14"
edition = "2024"
license = "MIT"
repository = "https://github.com/wirenboard/agent-vm"
# wirenboard's libkrun fork: msb_krun_* 0.1.13 with three fixes on top
# that are required for the userspace split irqchip to work and for the
# per-VM virtio-mmio cap to scale past ~11 devices:
# - virtio-console pre-activation panic guard (a3d4e3b) — without
# this, enabling split_irqchip(true) crashes the VMM during boot
# when a spurious epoll event hits the console device before the
# guest driver activates it.
# - mptable: emit one MP_INTSRC entry per IOAPIC pin (01d8661) — the
# pre-fix 16-entry table broke virtio-mmio probes on pin > 15.
# - cmdline overflow warning (faf8a58) — surfaces the otherwise
# silent x86 COMMAND_LINE_SIZE=2048 truncation in early boot.
# All sibling msb_krun_* crates are patched from the same git source
# because they share types across crate boundaries (e.g. msb_krun_vmm
# holds `dyn Subscriber` impls of msb_krun_devices' Console); mixing
# registry + git crates from the same cohort gives crate-identity
# mismatches even when the version numbers agree.
# Pinned to a specific commit so this Cargo.lock is reproducible;
# bump when filing the upstream PR is the right time to revisit.
[patch.crates-io]
msb_krun = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_arch = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_arch_gen = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_cpuid = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_devices = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_hvf = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_kernel = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_polly = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_smbios = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_utils = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
msb_krun_vmm = { git = "https://github.com/wirenboard/libkrun", rev = "38e46f2" }
[profile.release]
codegen-units = 16
lto = "thin"
strip = true
# For distribution builds where binary size / runtime perf matter most.
# Slower to build (single-threaded LTO + 1 codegen unit). Use: `cargo build --profile dist`.
[profile.dist]
inherits = "release"
codegen-units = 1
lto = "fat"