Re: [PATCH v7 01/12] PCI: liveupdate: Set up FLB handler for the PCI core
From: Bjorn Helgaas
Date: Thu Jul 23 2026 - 18:21:24 EST
On Fri, Jul 10, 2026 at 09:26:04PM +0000, David Matlack wrote:
> Set up a File-Lifecycle-Bound (FLB) handler for the PCI core to enable
> it to participate in the preservation of PCI devices across Live Update.
> Essentially, this commit enables the PCI core to allocate a struct
> (struct pci_ser) and preserve it across a Live Update whenever at least
> one device is preserved.
> ...
> +#define pr_fmt(fmt) "PCI: " KBUILD_BASENAME ": " fmt
Is KBUILD_BASENAME buying us something important here? Just from
code-reading perspective, it's more work because without some digging
I don't know what it will end up looking like in a dmesg log.
> +static void pci_flb_unpreserve(struct liveupdate_flb_op_args *args)
> +{
> + struct pci_flb_outgoing *outgoing = args->obj;
> +
> + WARN_ON(outgoing->ser->nr_devices);
> + kho_block_set_destroy(&outgoing->block_set);
> + kho_unpreserve_free(outgoing->ser);
> + kfree(outgoing);
> + pr_debug("Unpreserved struct pci_ser\n");
If this pr_debug() is useful, maybe it should include an address and
there should be a corresponding pr_debug() on the preserve side so we
could find things in a crashdump?
> +int pci_liveupdate_register_flb(struct liveupdate_file_handler *fh)
> +{
> + pr_debug("Registering file handler \"%s\"\n", fh->compatible);
Is fh->compatible enough to identify a driver?