]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn: convert drive device setup to bridge
authorChristian Brauner <brauner@kernel.org>
Wed, 8 Apr 2026 06:54:23 +0000 (08:54 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 15 Apr 2026 08:14:48 +0000 (10:14 +0200)
commite7d84aa4de9b293c2f48b2f76100befd88d5ab3c
tree7aece8ff4f87ccb7026da3bc9d2e9cf93777f61e
parent723126736ff6c3e725dbe1512e8a6ade14d4f3b2
vmspawn: convert drive device setup to bridge

Remove the static blockdev/device/snapshot INI config sections and
the SCSI controller setup for both the root image drive and extra
drives. Replace with DriveInfos that are constructed in the parent
after fork: vmspawn opens all image files and passes fds to QEMU via
the add-fd path. For ephemeral mode, anonymous overlay files are
created via O_TMPFILE or memfd.

The resolve_disk_driver() helper maps DiskType to the appropriate
QEMU driver name and serial format.

The post-fork device-info preparation is split into helpers:
prepare_primary_drive() and prepare_extra_drives() for per-drive
construction, assign_pcie_ports() for naming the pre-allocated
pcie-root-port bridges once every device type is known, and
prepare_device_info() that stitches them together against the
MachineConfig aggregate.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
src/vmspawn/vmspawn.c