Skip to content

Commit 52ba519

Browse files
bjackmanastro
authored andcommitted
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.
1 parent 9349244 commit 52ba519

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runners/firecracker.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ in {
8686
then throw "hotpluggedMem not implemented for Firecracker"
8787
else if credentialFiles != {}
8888
then throw "credentialFiles are not implemented for Firecracker"
89-
else lib.escapeShellArgs [
89+
else lib.escapeShellArgs ([
9090
"${pkgs.firecracker}/bin/firecracker"
9191
"--config-file" configFile
9292
"--api-sock" (
9393
if socket != null
9494
then socket
9595
else throw "Firecracker must be configured with an API socket (option microvm.socket)!"
9696
)
97-
];
97+
] ++ lib.optional (lib.versionAtLeast pkgs.firecracker.version "1.13.0") "--enable-pci");
9898

9999
preStart = ''
100100
${preStart}

0 commit comments

Comments
 (0)