From a198efa50ec127e8de35070b83e87b832d823871 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Thu, 6 Nov 2025 16:44:16 +0000 Subject: [PATCH] firecracker: Set --enable-pci option when available This enables the PCI virtio transport which is supposed to be faster than the MMIO one. Support for this flag is currently only availble in Nixpkgs unstable. I haven't been able to measure these perf improvements. However this is still what the Firecracker docs say to do. An option for this can be added as needed, for now just keep it simple. --- lib/runners/firecracker.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runners/firecracker.nix b/lib/runners/firecracker.nix index a73f97fb..5d71664b 100644 --- a/lib/runners/firecracker.nix +++ b/lib/runners/firecracker.nix @@ -86,7 +86,7 @@ in { then throw "hotpluggedMem not implemented for Firecracker" else if credentialFiles != {} then throw "credentialFiles are not implemented for Firecracker" - else lib.escapeShellArgs [ + else lib.escapeShellArgs ([ "${pkgs.firecracker}/bin/firecracker" "--config-file" configFile "--api-sock" ( @@ -94,7 +94,7 @@ in { then socket else throw "Firecracker must be configured with an API socket (option microvm.socket)!" ) - ]; + ] ++ lib.optional (lib.versionAtLeast pkgs.firecracker.version "1.13.0") "--enable-pci"); preStart = '' ${preStart}