[PATCH v6 02/12] PCI: liveupdate: Track outgoing preserved PCI devices
Pasha Tatashin
pasha.tatashin at soleen.com
Fri Jun 12 04:38:56 PDT 2026
On Fri, 22 May 2026 20:24:00 +0000, David Matlack <dmatlack at google.com> wrote:
> diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c
> index 737e7b9366db..065d5af822f7 100644
> --- a/drivers/pci/liveupdate.c
> +++ b/drivers/pci/liveupdate.c
> @@ -115,6 +150,138 @@ static struct liveupdate_flb pci_liveupdate_flb = {
> [ ... skip 59 lines ... ]
> + dev_ser->bdf = pci_dev_id(dev);
> + dev_ser->refcount = 1;
> +
> + dev->liveupdate.outgoing = dev_ser;
> + return 0;
> + }
This loop is compatible with KHO block iterators, as mentioned in the
previous email. It should be straightforward to convert to them.
>
> diff --git a/include/linux/kho/abi/pci.h b/include/linux/kho/abi/pci.h
> index 6ebcf817fff4..85def616703d 100644
> --- a/include/linux/kho/abi/pci.h
> +++ b/include/linux/kho/abi/pci.h
> @@ -23,19 +23,22 @@
> [ ... skip 16 lines ... ]
> */
> struct pci_dev_ser {
> u32 domain;
> u16 bdf;
> - u16 padding;
> + u16 refcount;
Just add refcount to the previous patch, to reduce changes to your own
code.
Otherwise looks good
--
Pasha Tatashin <pasha.tatashin at soleen.com>
More information about the kexec
mailing list