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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E8F9FEFB5D for ; Fri, 27 Feb 2026 15:47:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80E766B0005; Fri, 27 Feb 2026 10:47:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C5BB6B0088; Fri, 27 Feb 2026 10:47:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 690536B0092; Fri, 27 Feb 2026 10:47:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5AB4A6B0005 for ; Fri, 27 Feb 2026 10:47:11 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0C37D160754 for ; Fri, 27 Feb 2026 15:47:11 +0000 (UTC) X-FDA: 84490665462.22.E2A59FC Received: from flow-b1-smtp.messagingengine.com (flow-b1-smtp.messagingengine.com [202.12.124.136]) by imf29.hostedemail.com (Postfix) with ESMTP id DFF7E120009 for ; Fri, 27 Feb 2026 15:47:08 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=shazbot.org header.s=fm3 header.b=nSbeJn09; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="A 7cma9d"; spf=pass (imf29.hostedemail.com: domain of alex@shazbot.org designates 202.12.124.136 as permitted sender) smtp.mailfrom=alex@shazbot.org; dmarc=pass (policy=none) header.from=shazbot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1772207229; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=P3lrzFyQElxBxtWsP+osjrtrIRj/rA3HI8aIxSL+eHc=; b=iLLV4tJ6LwdVOPa9vKYROpSyxTtDSRTunIKiltkY00JOdypEs1WA1WGHctArTsstekar8A hLDU9bjF0STPxccEUsnUab/e6k0XQCSnR/xhb+qBJytN1473YnfYOb9EX8s4facAsANnBq 2Px2lcvtm79qaIdbmKFVVjq/iqcbBTU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1772207229; a=rsa-sha256; cv=none; b=yglpmpmE2Qf+XdT+ft3uB+DjTTyahbhyoYoEWaUZzWfcKYO9dmQ43afA41hSozAqiB3rOU e+PYLBC04jZKub9Y/hhG8xDTsu7/qeeQQJs4Z1t7Cmjy5ZFRUjuCqdf4C8DcsS4la3RKA+ VY/LIYxJJjfrWCT9GrRsZ4KWk9S5BLo= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=shazbot.org header.s=fm3 header.b=nSbeJn09; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="A 7cma9d"; spf=pass (imf29.hostedemail.com: domain of alex@shazbot.org designates 202.12.124.136 as permitted sender) smtp.mailfrom=alex@shazbot.org; dmarc=pass (policy=none) header.from=shazbot.org Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailflow.stl.internal (Postfix) with ESMTP id 1409613013DF; Fri, 27 Feb 2026 10:47:06 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Fri, 27 Feb 2026 10:47:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1772207225; x=1772214425; bh=P3lrzFyQElxBxtWsP+osjrtrIRj/rA3HI8aIxSL+eHc=; b= nSbeJn091CVUD7FTBlfHAGofIbMFpGvhhKPN5P+AXxi2R6g+zB9bTzPy8M7zKOX9 190koYZVQtOhErFW5Nk2ZXp3dvbyl6UiMLVn8Vdws7SsR0yodwKy9wHBllJkNGeA AsGuDTTDeNXhDKsH6A+ttPLVwAgWN6I/IDfUUfKYIDL7djAhXluESe2mDgoVuE/0 H5H5lmhuaO4ap/bK0tc8OziXtOlDMPcxvZ9+r+b71xqQG/wIdKjH1rs6QDjOCkRk NLaqv5GEjMIEAoVWLHqK6FLBpxQhya3L1m/31iVG+OzOLBESOmuKD7/FN0SBI+f3 94CVvMVtttES7JAOlQJp3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1772207225; x= 1772214425; bh=P3lrzFyQElxBxtWsP+osjrtrIRj/rA3HI8aIxSL+eHc=; b=A 7cma9dBosB0GIWXa1m7+Lm/GchbRtgqA/xwo85CSUbQlkjtuGWtWnsFqnFaEz26K XIjU47rn+BcT8PvTsqtvovSTHPoqwmFxcttdD8BqQeCdzm/9K2blLDhKqWUl3idP wIyeWR3wYpc5y+VTOnLFWijeVmHt3I48Wf5E5jBf3bfwmmPzfIEl5Uiq1ztEtCUb TtxChaiXmQlGbcnDqB0XuSPH9RUPouePhNnHw66TqOLnqCXBdIR+BZZwgl/mePTT 2Ndu2PcdwnDMxOAC1MaII1xlSg8Ocgn1jc3idGiGtiMejdDwaHcAThhlfyHUQ01U YmEbEKrgFw3TDqLvqVi1A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeelfeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkjghfofggtgfgsehtjeertdertddvnecuhfhrohhmpeetlhgvgicu hghilhhlihgrmhhsohhnuceorghlvgigsehshhgriigsohhtrdhorhhgqeenucggtffrrg htthgvrhhnpedvkeefjeekvdduhfduhfetkedugfduieettedvueekvdehtedvkefgudeg veeuueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grlhgvgiesshhhrgiisghothdrohhrghdpnhgspghrtghpthhtohepgeehpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegumhgrthhlrggtkhesghhoohhglhgvrdgtohhmpd hrtghpthhtoheprghjrgihrggthhgrnhgurhgrsehnvhhiughirgdrtghomhdprhgtphht thhopehgrhgrfhesrghmrgiiohhnrdgtohhmpdhrtghpthhtoheprghmrghsthhrohesfh gsrdgtohhmpdhrtghpthhtoheprghpohhpphhlvgesnhhvihguihgrrdgtohhmpdhrtghp thhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtihhonhdrohhrghdprhgtphhtth hopegrnhhkihhtrgesnhhvihguihgrrdgtohhmpdhrtghpthhtohepsghhvghlghgrrghs sehgohhoghhlvgdrtghomhdprhgtphhtthhopegthhhrihhslheskhgvrhhnvghlrdhorh hg X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Feb 2026 10:47:00 -0500 (EST) Date: Fri, 27 Feb 2026 08:46:58 -0700 From: Alex Williamson To: David Matlack Cc: Adithya Jayachandran , Alexander Graf , Alex Mastro , Alistair Popple , Andrew Morton , Ankit Agrawal , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , 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?B?TWlj?= =?UTF-8?B?aGHFgg==?= 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?B?SGVsbHN0csO2bQ==?= , Tomita Moeko , Vipin Sharma , Vivek Kasireddy , William Tu , Yi Liu , Zhu Yanjun , alex@shazbot.org Subject: Re: [PATCH v2 10/22] vfio/pci: Skip reset of preserved device after Live Update Message-ID: <20260227084658.3767d801@shazbot.org> In-Reply-To: References: <20260129212510.967611-1-dmatlack@google.com> <20260129212510.967611-11-dmatlack@google.com> <20260226170030.5a938c74@shazbot.org> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: DFF7E120009 X-Stat-Signature: hgb5cmb7g1f37ghdykggqx6p6nyqasmo X-Rspam-User: X-HE-Tag: 1772207228-110676 X-HE-Meta: U2FsdGVkX1+v0L3iyFTgjv2Xr4i/Q72hZMaVxQyrSqg1vxwRhxN9e8FC2gGy9SJzCvSCLEkF6AxsR1zBV2ZKZyrH7M09B1Wko6meWQcf4J147caDLh8y1tEHJP3IPZQlR92zNvTDu2rCukq54wg0frGTxLDyZ70aHAiQNtjHZaxU3NAm8GXLArVt1j7lerB6z6TZsCujS84ap5GAVYpvb0NjxNTs0VOzfOCBmaB1+TVGuPBLHas9zwH+OwyluUELg+RTxGMOEiTlDQkB2nv8R54u3YR+JDINNZLJEQjXbeBjrw0o2v7xFKQo8/z8G/2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-Subscribe: List-Unsubscribe: On Fri, 27 Feb 2026 00:51:18 +0000 David Matlack wrote: > On 2026-02-26 05:00 PM, Alex Williamson wrote: > > On Thu, 29 Jan 2026 21:24:57 +0000 > > David Matlack wrote: > > > > > > - vdev->reset_works = !ret; > > > pci_save_state(pdev); > > > vdev->pci_saved_state = pci_store_saved_state(pdev); > > > > Isn't this a problem too? In the first kernel we store the initial, > > post reset state of the device, now we're storing some arbitrary state. > > This is the state we're restore when the device is closed. > > The previous kernel resets the device and restores it back to its > post reset state in vfio_pci_liveupdate_freeze() before handing off > control to the next kernel. So my intention here is that VFIO will > receive the device in that state, allowing it to call > pci_store_saved_state() here to capture the post reset state of the > device again. > > Eventually we want to drop the reset in vfio_pci_liveupdate_freeze() and > preserve vdev->pci_saved_state across the Live Update. But I was hoping > to add that in a follow up series to avoid this one getting too long. I appreciate reviewing this in smaller chunks, but how does userspace know whether the kernel contains a stub implementation of liveupdate or behaves according to the end goal? Also, didn't we violate our own contract in this patch by adding the reset_works field to the serialization data without updating the compatibility string? Thanks, Alex