freenode
Kernel & Low-Level

PCI core gains Live Update support for kexec device continuity

David Matlack’s v10 series lets selected PCI endpoints keep DMA running across a host kernel upgrade without topology or routing changes.

The Linux PCI core is getting first-class support for Live Update, so selected PCI devices can keep running through a kexec-based kernel upgrade instead of being torn down and reinitialized.

David Matlack posted the tenth revision of the series on the kernel mailing list. The work targets environments where downtime is expensive, especially hosts that hand devices to virtual machines through VFIO. Today a host kernel upgrade typically means interrupting those devices. With Live Update, drivers can mark devices to preserve, hand their state to the next kernel via Kexec Handover, and leave memory traffic in flight, including DMA into preserved memfds.

Userspace chooses what to keep by preserving driver-exposed file descriptors through the Live Update Orchestrator. The PCI core tracks that choice, serializes its own state, and on the incoming kernel identifies preserved devices during enumeration so it will not disturb them while they are still active.

Continuity depends on the fabric looking the same after the jump. Upstream bridges are preserved automatically with reference counting for as long as any downstream device remains preserved. Secondary and subordinate bus numbers and ARI forwarding are inherited so RequesterIDs stay stable. Access Control Services controls are adopted rather than recomputed, so transaction routing and IOMMU group membership do not shift mid-flight. On the way out, shutdown no longer clears bus mastering on preserved endpoints or their upstream bridges, which would otherwise stop DMA and bridge forwarding during kexec.

Limits remain deliberate for this round: virtual functions are out, peer-to-peer preservation is deferred, devices that need quirks to enable ACS cannot be preserved, and CardBus is incompatible for now. Binding the correct driver on the way in is still the operator’s responsibility. Documentation for the file-lifecycle API, device tracking, and preservation policy is included. Support for VFs and P2P is expected in later series.