From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795041431; b=g/+FxX00v6rIGtyAEA8lVhwWktGoCE5A9QPjxHKYPu1j/CVvzsZv2UjjGLjqnYZ0gBfA WJyd6AGPI9kDUajwIRJPkJk7Ial95o3d4ZgWnY7X8pnAL30AUC/PrloNQwP/ogmzbTFIW +fcQLsXYs9wrrh+CgzbleKm8JBW8I+hTf8fHe50TfzhTGcieKy2/RyYnHaan6Owf/cZsU IW97gRIiGWAWDLZBRFG3S9nJUA7UVzljdbM2uGcCRIGl+8NyAuP/NcKsC+d07gt76E+Ub pg+S1xMpeFZyducbRN2haiaYxEyOpvG9hCKH+N9CGDGUK29TBR3WTK+heTLFbfE1m7g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795041431; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=+taJEcx0HgGHe7DJeX0vXHzT5xK/DXPvks4/EBL5fBw=; b=kY8uNZYr0P59G8SOA74A1uL3Co27qAexj5jpcFGzeyH/PgY7e2xJ+0FMfgfpM1tv4CEv oQDXj471yAq8BhZr901/IqRRuCGnq7bXK426hXsP6AMvUzrYlYJSwOOchTO9cUOxSzd+k aXIxKHBdHoIe9D/2XVt9xfLgmPLkLNEKcbqlJ/p8iT5ryEaJGEFhXuT2jKaBIvRlKKQVu a/RU2bV2mS28NyJY7tuymYj0rExOJ7j/kYpA7Nlxf5G/p1yXcbuFo+mqnbCTvy3KupD6x g7gH3v8RVOQ37w9/ZIO+cyxoL0qOTzcgX9zDW6GF5oD487UwZ/SwbUYJucXqr0gPzog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=TqN3l6at; arc=none smtp.remote-ip=209.85.210.71 Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EED760A2607 for ; Wed, 18 Nov 2026 22:37:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2EED760A2607 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=TqN3l6at Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-8520e83f715so1590867a34.2 for ; Wed, 18 Nov 2026 14:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1795041430; x=1795646230; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=+taJEcx0HgGHe7DJeX0vXHzT5xK/DXPvks4/EBL5fBw=; b=TqN3l6atL5U7OyDFjcs12hntwGywETIz0k1DuqzYAmdi9rMTaBZheVmkpnSwdx3+hB Lkx5g3Gc63G4lXcb8Rglt4U0iP1dttYkevmG3BYuM6VDqvUZC3oHJWrj9wwwbRdp+E4n 4k+gJx4LacQCgUDnA6bPQvFP4U+aHnGN3XRQ1675dF1k2qAiIlUatsA9GPyJHK3nza0Z f5qGhkqDZsRILPO+QcXUHGKTRpER3iSvIXGkLBBExMWdiPPOjI2adlZAgIhwQJIxJFiC lMNKs39fe6xoH1Jc48ebbRfl7tH9IpIMNzc//jvUslEo1qlASUQXUFQgN+O1QtbWrQ1B 7gAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795041430; x=1795646230; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=+taJEcx0HgGHe7DJeX0vXHzT5xK/DXPvks4/EBL5fBw=; b=Q7Ail4vMMx5mJhxHCf3EcvX66WiH71x52jmb1DoJcp3U9jsn6qdPDOVvfpi4ANI5NB LNbQ8EZMYhvQTeCtUumo6gjZ7yENnqBYzap+ssLLB2wimaYD0GWSh3jyALOBCEJDLP8p I+5FLF39pcK2dYht+nFJtc5UMBL2y+qdKgVLMPlZGwmHiwXB3a8b1Fhc66bJO8Ck1yqm Xr0HItnI8rUKUnW6NvMrQpH2/0WnVPJkO3eE3HEUyGY7BBE6ukaBC+HrSeyMiSGn1yL2 f2Hpwqj9UGE4BwWy9AZ0jkMrC64HrbUr4QSOehoZAcV69ugbmyX8i56RNRR0DmkpnupB PSTw== X-Forwarded-Encrypted: i=1; AL+hErGLktRc7z5h/xUthSGkenpqf8LPhwsJnX4iyQjVRma7O1SwjOuD6E+SwJTTMcQ8N0NtQfmhZ8531ys=@vger.kernel.org X-Gm-Message-State: APuU4Z+MgBj8HTudOZn3+vim3TjHyHhrgKDYrQossIUJ7D2DmfsIDn+l FTy7g1Ey2ycDtPJhlxhSh/8ecxlxTLB4hsWQNwcDf924GochPlKzbNdTYeTyFTHvauAXznyTP6R PUFzZI3kjeE+zQg== X-Received: from japu25.prod.google.com ([2002:a02:cb99:0:b0:601:e61d:c88c]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:1927:b0:4af:5d69:1cb4 with SMTP id 5614622812f47-5773cd2176emr5139451b6e.15.1795041429780; Wed, 18 Nov 2026 14:37:09 -0800 (PST) Date: Wed, 18 Nov 2026 22:36:53 +0000 In-Reply-To: <20261118223704.3286085-1-dmatlack@google.com> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261118223704.3286085-1-dmatlack@google.com> X-Mailer: git-send-email 2.56.1.708.g77570a6a1d-goog Message-ID: <20261118223704.3286085-3-dmatlack@google.com> Subject: [PATCH v11 02/13] PCI: liveupdate: Track outgoing preserved PCI devices From: David Matlack To: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org Cc: Adithya Jayachandran , Alexander Graf , Alex Williamson , Alex Williamson , Bjorn Helgaas , Chris Down , Chris Li , David Matlack , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Randy Dunlap , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Content-Type: text/plain; charset="UTF-8" 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). Later patches use this to leave preserved devices running during shutdown and kexec, and the list of preserved devices is handed off to the next kernel. Warn if a device is released while it is still preserved. Panic if any device is still preserved when the outgoing FLB is freed, i.e. some driver failed to call pci_liveupdate_unpreserve(). Freeing the outgoing state would otherwise leave dangling dev->liveupdate.outgoing pointers behind. For now, the API only supports preserving non-VF devices on a root bus (not behind a PCI-to-PCI bridge). Signed-off-by: David Matlack Reviewed-by: Pranjal Shrivastava Reviewed-by: Pasha Tatashin Reviewed-by: Bjorn Helgaas Reviewed-by: Samiullah Khawaja --- MAINTAINERS | 1 + drivers/pci/liveupdate.c | 267 ++++++++++++++++++++++++++++++++- drivers/pci/liveupdate.h | 21 +++ drivers/pci/probe.c | 2 + include/linux/pci.h | 3 + include/linux/pci_liveupdate.h | 21 +++ 6 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 drivers/pci/liveupdate.h diff --git a/MAINTAINERS b/MAINTAINERS index 639db5d00a80..6b7c5f3a64d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21555,6 +21555,7 @@ L: linux-pci@vger.kernel.org S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git F: drivers/pci/liveupdate.c +F: drivers/pci/liveupdate.h F: include/linux/kho/abi/pci.h F: include/linux/pci_liveupdate.h diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c index 173433f64d00..d6f2ea4c23ce 100644 --- a/drivers/pci/liveupdate.c +++ b/drivers/pci/liveupdate.c @@ -59,6 +59,7 @@ * luo_flb_file_preserve_one() # first preserved file only * pci_flb_preserve() # alloc and preserve struct pci_ser * fh->ops->preserve() # driver callback + * pci_liveupdate_preserve(dev) # record this device in struct pci_ser * * # Userspace: preservation cancelled or session torn down * luo_file_unpreserve_files() @@ -79,6 +80,27 @@ * luo_flb_file_finish() * liveupdate_flb_put_incoming() # last incoming file only * pci_flb_finish() # free struct pci_ser + * + * Device Tracking + * =============== + * + * Drivers must notify the PCI core when specific devices are preserved or + * unpreserved with the following APIs: + * + * * ``pci_liveupdate_preserve(pci_dev)`` + * * ``pci_liveupdate_unpreserve(pci_dev)`` + * + * This allows the PCI core to keep its FLB data (struct pci_ser) up to date + * with the list of **outgoing** preserved devices for the next kernel. + * + * Restrictions + * ============ + * + * The PCI core enforces the following restrictions on which devices can be + * preserved. These may be relaxed in the future: + * + * * The device cannot be a Virtual Function (VF). + * * The device cannot be behind a PCI-to-PCI bridge. */ #define pr_fmt(fmt) "PCI: liveupdate: " fmt @@ -93,6 +115,21 @@ #include #include +#include "liveupdate.h" + +/** + * struct pci_liveupdate_global - Global state for PCI Live Update support + * @rwsem: Reader/writer semaphore used to protect the incoming and outgoing + * FLBs, and the references to them in struct pci_dev. + */ +struct pci_liveupdate_global { + struct rw_semaphore rwsem; +}; + +static struct pci_liveupdate_global pci_liveupdate = { + .rwsem = __RWSEM_INITIALIZER(pci_liveupdate.rwsem), +}; + /** * struct pci_flb_outgoing - Outgoing PCI FLB object * @ser: Pointer to the preserved struct pci_ser. @@ -103,6 +140,37 @@ struct pci_flb_outgoing { struct kho_block_set block_set; }; +/* + * Panic if any struct pci_dev_ser in @block_set is still in use, i.e. some + * driver failed to call pci_liveupdate_unpreserve(). This runs once the last + * reference to the FLB is dropped, so no unpreserve can be in flight. + * + * Report the devices from the FLB rather than by walking struct pci_dev, so + * that devices that were destroyed while preserved are identified as well. + */ +static void pci_check_all_devices_released(struct pci_ser *ser, + struct kho_block_set *block_set) +{ + struct pci_dev_ser *dev_ser; + struct kho_block_set_it it; + + if (!ser->nr_devices) + return; + + kho_block_set_it_init(&it, block_set); + while ((dev_ser = kho_block_set_it_read_entry(&it))) { + if (!dev_ser->refcount) + continue; + + pr_emerg("%04x:%02x:%02x.%d was never released!\n", + dev_ser->domain, PCI_BUS_NUM(dev_ser->bdf), + PCI_SLOT(dev_ser->bdf), PCI_FUNC(dev_ser->bdf)); + } + + panic("%u preserved device(s) were never released!\n", + ser->nr_devices); +} + static int pci_flb_preserve(struct liveupdate_flb_op_args *args) { struct pci_flb_outgoing *outgoing __free(kfree) = NULL; @@ -137,7 +205,7 @@ static void pci_flb_unpreserve(struct liveupdate_flb_op_args *args) pr_debug("Unpreserving struct pci_ser (0x%llx)\n", args->data); - WARN_ON(outgoing->ser->nr_devices); + pci_check_all_devices_released(outgoing->ser, &outgoing->block_set); kho_block_set_destroy(&outgoing->block_set); kho_unpreserve_free(outgoing->ser); kfree(outgoing); @@ -169,6 +237,203 @@ static struct liveupdate_flb pci_liveupdate_flb = { .compatible = PCI_LUO_FLB_COMPATIBLE, }; +static void pci_liveupdate_flb_put_outgoing(void) +{ + liveupdate_flb_put_outgoing(&pci_liveupdate_flb); +} + +static struct pci_flb_outgoing *pci_liveupdate_flb_get_outgoing(void) +{ + struct pci_flb_outgoing *outgoing = NULL; + int ret; + + ret = liveupdate_flb_get_outgoing(&pci_liveupdate_flb, (void **)&outgoing); + if (ret) + return ERR_PTR(ret); + + if (!outgoing) + return ERR_PTR(-ENOENT); + + return outgoing; +} + +static struct pci_dev_ser *pci_flb_alloc_dev_ser(struct pci_flb_outgoing *outgoing) +{ + struct pci_dev_ser *dev_ser; + struct kho_block_set_it it; + u64 count = 0; + int err; + + kho_block_set_it_init(&it, &outgoing->block_set); + + /* Try to find an existing, previously unpreserved, entry. */ + while ((dev_ser = kho_block_set_it_read_entry(&it))) { + if (!dev_ser->refcount) + return dev_ser; + + count++; + } + + /* Otherwise grow the block set and reserve a new entry. */ + err = kho_block_set_grow(&outgoing->block_set, count + 1); + if (err) + return ERR_PTR(err); + + if (!count) + kho_block_set_it_init(&it, &outgoing->block_set); + + /* This should always succeed since kho_block_set_grow() succeeded. */ + dev_ser = kho_block_set_it_reserve_entry(&it); + if (WARN_ON_ONCE(!dev_ser)) + return ERR_PTR(-ENOSPC); + + return dev_ser; +} + +/* + * Start preserving @dev by allocating its struct pci_dev_ser. The caller is + * responsible for taking a reference on it. + */ +static struct pci_dev_ser *pci_liveupdate_alloc_dev_ser( + struct pci_flb_outgoing *outgoing, struct pci_dev *dev) +{ + struct pci_dev_ser *dev_ser; + + dev_ser = pci_flb_alloc_dev_ser(outgoing); + if (IS_ERR(dev_ser)) + return dev_ser; + + pci_info(dev, "Device will be preserved across next Live Update\n"); + outgoing->ser->nr_devices++; + outgoing->ser->devices = kho_block_set_head_pa(&outgoing->block_set); + + dev_ser->domain = pci_domain_nr(dev->bus); + dev_ser->bdf = pci_dev_id(dev); + dev->liveupdate.outgoing = dev_ser; + return dev_ser; +} + +/* + * Stop preserving @dev by releasing its struct pci_dev_ser. + */ +static void pci_liveupdate_free_dev_ser(struct pci_flb_outgoing *outgoing, + struct pci_dev *dev) +{ + struct pci_dev_ser *dev_ser = dev->liveupdate.outgoing; + + pci_info(dev, "Device will no longer be preserved across next Live Update\n"); + outgoing->ser->nr_devices--; + memset(dev_ser, 0, sizeof(*dev_ser)); + dev->liveupdate.outgoing = NULL; +} + +static void pci_liveupdate_unpreserve_device(struct pci_flb_outgoing *outgoing, + struct pci_dev *dev) +{ + struct pci_dev_ser *dev_ser = dev->liveupdate.outgoing; + + if (!dev_ser) { + pci_warn(dev, "Cannot unpreserve device that is not preserved\n"); + return; + } + + pci_liveupdate_free_dev_ser(outgoing, dev); +} + +static int pci_liveupdate_preserve_device(struct pci_flb_outgoing *outgoing, + struct pci_dev *dev) +{ + struct pci_dev_ser *dev_ser; + + if (dev->is_virtfn) { + pci_warn(dev, "Cannot preserve Virtual Functions\n"); + return -EINVAL; + } + + if (dev->liveupdate.outgoing) { + pci_warn(dev, "Device is already preserved\n"); + return -EBUSY; + } + + if (!pci_is_root_bus(dev->bus)) { + pci_warn(dev, "Cannot preserve devices behind bridges\n"); + return -EINVAL; + } + + dev_ser = pci_liveupdate_alloc_dev_ser(outgoing, dev); + if (IS_ERR(dev_ser)) + return PTR_ERR(dev_ser); + + dev_ser->refcount++; + return 0; +} + +/** + * pci_liveupdate_preserve() - Preserve a PCI device across Live Update + * @dev: The PCI device to preserve. + * + * pci_liveupdate_preserve() notifies the PCI core that a PCI device should be + * preserved across the next Live Update. Drivers are expected to call + * pci_liveupdate_preserve() from their struct liveupdate_file_handler + * preserve() callback to ensure the outgoing struct pci_ser is already set up. + * + * Return: 0 on success, <0 on failure. + */ +int pci_liveupdate_preserve(struct pci_dev *dev) +{ + struct pci_flb_outgoing *outgoing = NULL; + int ret; + + guard(rwsem_write)(&pci_liveupdate.rwsem); + + outgoing = pci_liveupdate_flb_get_outgoing(); + if (IS_ERR(outgoing)) + return PTR_ERR(outgoing); + + ret = pci_liveupdate_preserve_device(outgoing, dev); + + pci_liveupdate_flb_put_outgoing(); + return ret; +} +EXPORT_SYMBOL_GPL(pci_liveupdate_preserve); + +/** + * pci_liveupdate_unpreserve() - Cancel preservation of a PCI device + * @dev: The PCI device to unpreserve. + * + * pci_liveupdate_unpreserve() notifies the PCI core that a PCI device should no + * longer be preserved across the next Live Update. Drivers are expected to call + * pci_liveupdate_unpreserve() from their struct liveupdate_file_handler + * unpreserve() callback, while the outgoing struct pci_ser still exists. + */ +void pci_liveupdate_unpreserve(struct pci_dev *dev) +{ + struct pci_flb_outgoing *outgoing = NULL; + + guard(rwsem_write)(&pci_liveupdate.rwsem); + + outgoing = pci_liveupdate_flb_get_outgoing(); + if (IS_ERR(outgoing)) { + pci_warn(dev, "Cannot unpreserve device without outgoing Live Update state\n"); + return; + } + + pci_liveupdate_unpreserve_device(outgoing, dev); + pci_liveupdate_flb_put_outgoing(); +} +EXPORT_SYMBOL_GPL(pci_liveupdate_unpreserve); + +void pci_liveupdate_cleanup_device(struct pci_dev *dev) +{ + /* + * No other references to @dev remain, so READ_ONCE() without the rwsem + * is sufficient. Drivers must block removal of preserved devices, so a + * warning here indicates a driver bug. + */ + if (READ_ONCE(dev->liveupdate.outgoing)) + pci_WARN(dev, 1, "Destroying outgoing-preserved device!\n"); +} + /** * pci_liveupdate_register_flb() - Register a file handler with the PCI core * @fh: The file handler to register. diff --git a/drivers/pci/liveupdate.h b/drivers/pci/liveupdate.h new file mode 100644 index 000000000000..b2335581f8d0 --- /dev/null +++ b/drivers/pci/liveupdate.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * PCI Live Update support (core API) + * + * Copyright (c) 2026, Google LLC. + * David Matlack + */ +#ifndef DRIVERS_PCI_LIVEUPDATE_H +#define DRIVERS_PCI_LIVEUPDATE_H + +#include + +#ifdef CONFIG_PCI_LIVEUPDATE +void pci_liveupdate_cleanup_device(struct pci_dev *dev); +#else +static inline void pci_liveupdate_cleanup_device(struct pci_dev *dev) +{ +} +#endif + +#endif /* DRIVERS_PCI_LIVEUPDATE_H */ diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9a178e0e5f7f..5c90383873a1 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -24,6 +24,7 @@ #include #include #include +#include "liveupdate.h" #include "pci.h" static struct resource busn_resource = { @@ -2492,6 +2493,7 @@ static void pci_release_dev(struct device *dev) pci_dev = to_pci_dev(dev); pci_release_capabilities(pci_dev); + pci_liveupdate_cleanup_device(pci_dev); pci_release_of_node(pci_dev); pcibios_release_device(pci_dev); pci_bus_put(pci_dev->bus); diff --git a/include/linux/pci.h b/include/linux/pci.h index 2c15c2666970..bb500623ca3e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -600,6 +600,9 @@ struct pci_dev { u8 tph_mode; /* TPH mode */ u8 tph_req_type; /* TPH requester type */ #endif +#ifdef CONFIG_PCI_LIVEUPDATE + struct pci_liveupdate liveupdate; +#endif }; static inline struct pci_dev *pci_physfn(struct pci_dev *dev) diff --git a/include/linux/pci_liveupdate.h b/include/linux/pci_liveupdate.h index 8ec98beefcb4..894052ad6961 100644 --- a/include/linux/pci_liveupdate.h +++ b/include/linux/pci_liveupdate.h @@ -8,14 +8,26 @@ #ifndef LINUX_PCI_LIVEUPDATE_H #define LINUX_PCI_LIVEUPDATE_H +#include #include +#include #include +/** + * struct pci_liveupdate - PCI Live Update state for a struct pci_dev + * @outgoing: State preserved for the next kernel. + */ +struct pci_liveupdate { + struct pci_dev_ser *outgoing; +}; + struct pci_dev; #ifdef CONFIG_PCI_LIVEUPDATE int pci_liveupdate_register_flb(struct liveupdate_file_handler *fh); void pci_liveupdate_unregister_flb(struct liveupdate_file_handler *fh); +int pci_liveupdate_preserve(struct pci_dev *dev); +void pci_liveupdate_unpreserve(struct pci_dev *dev); #else static inline int pci_liveupdate_register_flb(struct liveupdate_file_handler *fh) { @@ -25,6 +37,15 @@ static inline int pci_liveupdate_register_flb(struct liveupdate_file_handler *fh static inline void pci_liveupdate_unregister_flb(struct liveupdate_file_handler *fh) { } + +static inline int pci_liveupdate_preserve(struct pci_dev *dev) +{ + return -EOPNOTSUPP; +} + +static inline void pci_liveupdate_unpreserve(struct pci_dev *dev) +{ +} #endif #endif /* LINUX_PCI_LIVEUPDATE_H */ -- 2.56.1.703.gf848ed807c-goog