Re: [PATCH v6 02/12] PCI: liveupdate: Track outgoing preserved PCI devices
From: Pranjal Shrivastava
Date: Fri Jun 05 2026 - 02:11:39 EST
On Fri, May 22, 2026 at 08:24:00PM +0000, David Matlack wrote:
> 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).
>
> This tracking ensures the PCI core is fully aware of which devices may
> need special handling during shutdown and kexec, and so that it can be
> handed off to the next kernel.
>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
[...]
>
> /**
> * struct pci_dev_ser - Serialized state about a single PCI device.
> *
> * @domain: The device's PCI domain number (segment).
> * @bdf: The device's PCI bus, device, and function number.
> - * @padding: Padding to naturally align struct pci_dev_ser.
> + * @refcount: Reference count used by the PCI core to keep track of whether it
> + * is done using a device's struct pci_dev_ser. The value of the
> + * refcount is equal to 1 when the struct pci_dev_ser is in use, and
> + * 0 otherwise.
Note to fellow reviewers: This may seem like a bool instead of refcount,
but this is changed in Patch 6.
Reviewed-by: Pranjal Shrivastava <praan@xxxxxxxxxx>
Thanks,
Praan