v10 2026-11-04

PCI核心支持Live Update · v10

PCI Live Update v10 并入,跨 kexec 保留设备、上游桥、总线号及 ACS/ARI 状态。

原始补丁链接

子 Patch(13)

1/13
PCI: liveupdate: Set up FLB handler for the PCI core
注册 PCI core 的 FLB handler,将 pci_ser 交给 LUO 跨 kexec 保留核心状态;用户经 LIVEUPDATE_SESSION_PRESERVE_FD 按文件生命周期指定保留设备,新内核据此避免扰动。
2/13
PCI: liveupdate: Track outgoing preserved PCI devices
新增 pci_liveupdate_preserve()/unpreserve(),让驱动把 outgoing 保留设备登记到 PCI core,更新 pci_ser 与保留列表;当前仅支持根总线非 VF 设备。
3/13
PCI: liveupdate: Track incoming preserved PCI devices
枚举时 pci_liveupdate_setup_device() 从 LUO 取回 pci_ser,首次经 pci_flb_retrieve() 把 pci_dev_ser 数组转 xarray;命中则挂到 dev->liveupdate_incoming,供驱动判断,失败必须致命。
4/13
PCI: liveupdate: Document driver binding responsibilities
在 liveupdate.c 增加注释,说明 Live Update 下驱动绑定/解绑、用户与 PCI core 的职责边界和当前约定;仅为文档,无功能改动。
5/13
PCI: liveupdate: Auto-preserve upstream bridges across Live Update
保留设备时自动沿上游保留到 root port 的所有桥,并在 pci_dev_ser 用引用计数记录下游保留数;最后一个下游设备取消或结束后才释放桥,防止在途路由被破坏。
6/13
PCI: liveupdate: Preserve bus numbers during Live Update
上一内核有保留设备时,枚举不再重分配桥的 secondary/subordinate bus number,忽略 pci=assign-busses;避免改 RequesterID 使在途 DMA 失效;无 bus number 的桥仍可分配。
7/13
PCI: Refactor matching logic for pci_dev_acs_ops
把 pci_dev_acs_ops 的匹配循环抽成 pci_dev_acs_ops_get(),供 pci_dev_specific_enable_acs() 与 disable_acs_redir() 共用,减少重复并为 Live Update 判断设备特定 ACS 做准备。
8/13
PCI: Save and restore the ACS Control register and Egress Control Vector
在 pci_save_state()/pci_restore_state() 中保存并恢复 ACS Control 与 Egress Control Vector,不再由 pci_enable_acs() 重算;避免 reset 后 ACS 控制丢失,并为跨 Live Update 继承上一内核 ACS 策略铺路。
9/13
PCI: liveupdate: Adopt ACS controls in incoming preserved devices
对 incoming 保留设备及上游桥采用上一内核 ACS 控制,避免 DMA 在途时路由或 IOMMU group 变化;由 pci_bus_add_device() 的 pci_save_state() 记录,无 save buffer 则回退 pci_enable_acs(),并拒绝需 ACS quirk 的设备。
10/13
PCI: liveupdate: Adopt ARI Forwarding Enable on preserved bridges
Adopt the ARI Forwarding Enable bit on preserved bridges and update pci_dev->ari_enabled accordingly during a Live Update. This ensures that the preserved devices on the bridge’s secondary bus can be
11/13
PCI: liveupdate: Freeze preservation status during shutdown
Freeze a device’s outgoing preservation status (preserved or not preserved) during shutdown. This enables the PCI core and drivers to safely make decisions based on the device’s preservation status du
12/13
PCI: liveupdate: Do not disable bus mastering on preserved devices during kexec
Do not disable bus mastering on outgoing preserved devices during pci_device_shutdown() for kexec. Preserved devices must be allowed to perform memory transactions during a Live Update to ensure cont
13/13
Documentation: PCI: Add documentation for Live Update
Add documentation files for the PCI subsystem’s participation in Live Update. These documentation files are generated from the kernel-doc comments in the PCI Live Update source code. They describe th