On Tue, Sep 15, 2026 at 8:10 PM Zhu Yanjun <[email protected]> wrote: > > 在 2026/7/28 15:09, David Matlack 写道: > > Add APIs to allow drivers to notify the PCI core of which devices are > > being preserved across a Live Update for the next kernel, i.e. > > "outgoing" devices. > > > > Drivers must notify the PCI core when devices are preserved so that the > > PCI core can update its FLB data (struct pci_ser) and track the list of > > outgoing devices. pci_liveupdate_preserve() notifies the PCI core that a > > device must be preserved across Live Update. pci_liveupdate_unpreserve() > > reverses this (cancels the preservation of the device). > > Hi David, > > I have a question about the pci_liveupdate_preserve() and > pci_liveupdate_unpreserve() APIs. > > Is it supported to call these APIs multiple times for the same PCI > device? For example, a driver could do: > > pci_liveupdate_preserve(pdev) -- > pci_liveupdate_unpreserve(pdev) -- > > perform some operations -- > pci_liveupdate_preserve(pdev) again, before > the actual Live Update starts. > > From the implementation, it looks like an unpreserved pci_dev_ser entry > can be reused, so I wanted to confirm whether this preserve -- > > unpreserve -- > preserve sequence is an intended and supported usage.
Yes that is a completely supported use-case. A device can be preserved and unpreserved any number of times up until pci_device_shutdown(), where the preservation status of the device is frozen (see patch 10).
