Skip to content

Add support for creating PCIe root ports in QEMU#442

Merged
astro merged 1 commit intomicrovm-nix:mainfrom
nesteroff:pcie-ports
Dec 10, 2025
Merged

Add support for creating PCIe root ports in QEMU#442
astro merged 1 commit intomicrovm-nix:mainfrom
nesteroff:pcie-ports

Conversation

@nesteroff
Copy link
Contributor

@nesteroff nesteroff commented Dec 8, 2025

This change adds the ability to define PCIe root ports for QEMU virtual machines. These ports can be used for device hot-plugging, allowing vfio-pci devices to be attached dynamically.

In the current version, it's possible to create ports via extraArgs and set them in deviceExtraArgs but with recent changes (#437), this approach produces "bus not found" errors. There is likely a race condition between creating vfio-pci devices which are now placed at the beginning of the QEMU command and the PCIe ports that were appended at the end.

With this change, PCIe root ports are explicitly created before the vfio-pci devices that may use them.

@SuperSandro2000
Copy link
Member

Can you rebase on master to fix the eval/CI?

@nesteroff
Copy link
Contributor Author

Can you rebase on master to fix the eval/CI?

Sure, all green now.

@astro astro merged commit 3e86082 into microvm-nix:main Dec 10, 2025
5 checks passed
@nesteroff nesteroff deleted the pcie-ports branch December 10, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants