From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795984065; b=wKKvVkbdhS3r029o0BCAyHtt1Ft5ygU8/7vNZt3oBBw1E7O4e25PjDZ9SBjCmNDpn8zn 9aAkmoXBveV+kXNLU9uBVPo+EGmjIpHgAE90XpJA/As+4oekJ8gL2VQKRXuygexQzumOL YAZukJOIfNWv3FQWUxTmWaFTuOQkbQmoC2mLnDNmQUDC7kNSm5LJS36AkioGqpPLoeep/ Vc1V9gOPfoo2dpjUZSoQ9WoyXtFjNxQL01VhcKMzvFOF5RutKqcZLuBY7cAtULunVyF1q v++m0dGcDVdKBlY1U2ob7s4uQgv9cpkEtRLAJjCVe2JUVrZ+pr1FTXimJAQ2PIBb1pA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795984065; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=ZCpFEe2PeseBnrLxX5RdRm5vIukUrilHYaJbQMjREU0=; b=oGk24cPGfeicQuf3pHxaP3QFVeTKFmQ6hmBuB0C7F7UvRXErPfzaq7fyy2aFFdQ2xL7b omVfBdU02GQ6rzQp5sRZI710m2LPUMsWJvoZ8reht2dL/xf4c0t5+lLRIUy8+7nqaMkkT jUlm3/cA8HMcT9p3DEsS+JEWVdQ299MC7C5Mu5+qR5FbRJtmmwkqWifQhTJ3BOz7al9ue /xU8tNsHesqHJPIjwhHigHcRzQI18MglvDFXHRYhNn1J+eyJZon0x7dLq0LrgJzyc49m8 ifSXphySUkGlcyaRsM0KiozhXq2+BnS8KQ4N+Nlp5gVjmLKeYr+zHwxPR+5XHUTH8Mw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kJGQn6sh; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69643606A31C for ; Sun, 29 Nov 2026 20:27:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kJGQn6sh Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AAFD1F00939; Sun, 29 Nov 2026 20:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795984064; bh=ZCpFEe2PeseBnrLxX5RdRm5vIukUrilHYaJbQMjREU0=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=kJGQn6shOCWlLtgOraqJl4GjT0fTmp873TtgI2cEluL4VPPQDx8bTZgFGA2hGHAoc 3G27DogPCkrRuIZ3hsnOZfakjcpwwzxSIoTZrMUYTS9Ptx/B5HSId8lGqDyLqMzqN+ pSHnCrfYa6VFTNAUtUboXlcfXiT+X50YE5+f8vLmTjKAmGoUXUU9KWNf6V5FIHf2mF EOr0d9DlPmbdhOSPI/ZpwYU/Ko/+fWt+1ptYFjbkQuXmTgwAwo6MeinOY0C0CApvHo MeOcqa270CRbM6IBtqR7ZGJNNR9dOENjaCI7o2B3PZzACTi/04LFKaK3iXov8AuOCl 0x22J/ojCiEiA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] spi: virtio: move freeze/restore callbacks to virtio_driver Reply-To: sashiko-reviews@lists.linux.dev To: "Francesco Valla" Cc: virtualization@lists.linux.dev, "Michael S. Tsirkin" , "Eugenio Perez" In-Reply-To: <20261129-spi-virtio-restore-fix-v1-1-97e99be95d24@valla.it> References: <20261129-spi-virtio-restore-fix-v1-1-97e99be95d24@valla.it> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 20:27:44 +0000 X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > A virtio driver needs to route its freeze and restore callbacks through > the virtio framework rather than generic pm, or the restore callbacks > from its parent (that runs before the driver's) will mark the driver > ready before it can re-create its virtqueues, leading to a dead > communication and violating the virtio specification. At driver side, > this also leads to a hang at first SPI transaction after resume. >=20 > Move the freeze/restore operations to the corresponding virtio_driver > callbacks, so that the virtio core takes care of them. This aligns > the SPI driver to what other virtio drivers are doing. >=20 > In the restore callback, call virtio_device_ready() before resuming the > SPI controller; in this way, the device is correctly notified of the > readiness before any request can arrive from the driver. >=20 > Behavior reproduced and fix tested on QEMU. >=20 > Fixes: f98cabe3f6cf ("SPI: Add virtio SPI driver") > Cc: stable@vger.kernel.org > Signed-off-by: Francesco Valla Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129-spi-virtio= -restore-fix-v1-1-97e99be95d24@valla.it?part=3D1