From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56B64105F7B5 for ; Fri, 13 Mar 2026 15:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VVQdnkFvzB/gHBAeEfjDOu3ipWHlOC3d2TtGMa0Nogc=; b=TgwVphFUz098kl7/avWmi9+fA0 MnkSkN8MbMRw+wJZuM8CuyNGqPLVCXK8Jgck8cM1Gt1W8/NVB0XAMVsFWhyX5ZOrHlY+0MNi3yVJs yZ5tkI/gU+mVSrQ2mvnKd6PmErKQsmb1vxNL0fI+jtn1B7YzB2zsqc2D0UeAHjl7zFpR0/pMygJyo hno9iHH6mXCbbxzpVYFsKCTm3Nux0UhN97h7BhxaTj9lVWX3YUGkUulolz+btjp9ggp0g+ctD4MYL t5lUZIhud/iLkGK3vlY+ZjiZaWg9J/ZcjRLIiMALFVMF+MPkol/Lt+DRZP2o4lpj1rOaF6oiEMKcp +7BaFp2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w14bm-00000000ZS4-1Kf7; Fri, 13 Mar 2026 15:39:26 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w14bk-00000000ZRh-1LmG for kexec@lists.infradead.org; Fri, 13 Mar 2026 15:39:25 +0000 Received: from localhost (unknown [40.65.108.177]) by linux.microsoft.com (Postfix) with ESMTPSA id D661420B710C; Fri, 13 Mar 2026 08:39:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D661420B710C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1773416360; bh=VVQdnkFvzB/gHBAeEfjDOu3ipWHlOC3d2TtGMa0Nogc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bxGjZFhVAxog3QqvD0UQFk4sXHeeQ5NE2qTFN5kayLXjvmuIDnMGr+7++bUo9CucU ozt1v8CCrq0QALAxMV7zkbSKkHJCrii46ijMqsaPNHRiGsN8elmzY4FJG5Ye5XbnF8 qQbz/XGG8TzAcfJfbSL0GA/sFnxPqdXJNavH1QSw= Date: Fri, 13 Mar 2026 08:39:18 -0700 From: Jacob Pan To: David Matlack Cc: Alex Williamson , Adithya Jayachandran , Alexander Graf , Alex Mastro , Alistair Popple , Andrew Morton , Ankit Agrawal , Bjorn Helgaas , Chris Li , David Rientjes , Jason Gunthorpe , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Kevin Tian , kexec@lists.infradead.org, kvm@vger.kernel.org, Leon Romanovsky , Leon Romanovsky , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Lukas Wunner , =?utf-8?Q?Mich?= =?utf-8?Q?a=C5=82?= Winiarski , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Raghavendra Rao Ananta , Rodrigo Vivi , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , Tomita Moeko , Vipin Sharma , Vivek Kasireddy , William Tu , Yi Liu , Zhu Yanjun Subject: Re: [PATCH v2 10/22] vfio/pci: Skip reset of preserved device after Live Update Message-ID: <20260313083918.00005731@linux.microsoft.com> In-Reply-To: References: <20260129212510.967611-1-dmatlack@google.com> <20260129212510.967611-11-dmatlack@google.com> <20260226170030.5a938c74@shazbot.org> <20260227084658.3767d801@shazbot.org> <20260227105720.522ca97f@shazbot.org> Organization: LSG X-Mailer: Claws Mail 3.21.0 (GTK+ 2.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260313_083924_411514_31C2EE87 X-CRM114-Status: GOOD ( 29.57 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org Hi David, On Thu, 12 Mar 2026 23:39:45 +0000 David Matlack wrote: > On 2026-03-09 10:32 AM, David Matlack wrote: > > On Fri, Feb 27, 2026 at 9:57=E2=80=AFAM Alex Williamson > > wrote: =20 >=20 > > > Sorry if I don't have the whole model in my head yet, but is > > > exposing the restriction to the vfio user of the device > > > sufficient to manage the liveupdate orchestration? For example, > > > a VFIO_DEVICE_INFO_CAP pushes the knowledge to QEMU... what does > > > QEMU do with that knowledge? Who imposes the policy decision to > > > decide what support is sufficient? =20 > >=20 > > Hm.. good questions. I don't think we want userspace inspecting bits > > exposed by the kernel and trying to infer exactly what's being > > preserved and whether it's "good enough" to use. And such a UAPI > > would become tech debt once we finish development, I suspect. > >=20 > > A better approach would be to hide this support from userspace until > > we decide it is ready for production use-cases. > >=20 > > To enable development and testing, we can add an opt-in mechanism =20 >=20 > Here is what I am trending towards sending in v3 as the opt-in > mechanism: >=20 > diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig > index 1e82b44bda1a..770231554221 100644 > --- a/drivers/vfio/pci/Kconfig > +++ b/drivers/vfio/pci/Kconfig > @@ -58,6 +58,27 @@ config VFIO_PCI_ZDEV_KVM > config VFIO_PCI_DMABUF > def_bool y if VFIO_PCI_CORE && PCI_P2PDMA && DMA_SHARED_BUFFER >=20 > +config VFIO_PCI_LIVEUPDATE > + bool "VFIO PCI support for Live Update (EXPERIMENTAL)" > + depends on LIVEUPDATE && VFIO_PCI > + help > + Support for preserving devices bound to vfio-pci across a > Live > + Update. The eventual goal is that preserved devices can run > + uninterrupted during a Live Update, including DMA to > preserved > + memory buffers and P2P. However there are many steps still > needed to > + achieve this, including: > + > + - Preservation of iommufd files > + - Preservation of IOMMU driver state In the interim, what do you think about moving forward with noiommu mode without preserving IOMMU driver state? I=E2=80=99ve tested your vfio_pci_liveupdate_kexec_test with the noiommu cdev, and it works as expected. > + - Preservation of PCI state (BAR resources, device state, > ...) > + - Preservation of vfio-pci driver state > + > + This option should only be enabled by developers working on > + implementing this support. Once enough support has landed > in the > + kernel, this option will no longer be marked EXPERIMENTAL. > + > + If you don't know what to do here, say N. > + > source "drivers/vfio/pci/mlx5/Kconfig" >=20 > source "drivers/vfio/pci/hisilicon/Kconfig"