Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Francesco Valla" <francesco@valla.it>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH] spi: virtio: move freeze/restore callbacks to virtio_driver
Date: Sun, 29 Nov 2026 20:27:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-240009@kernel.org> (raw)
In-Reply-To: <20261129-spi-virtio-restore-fix-v1-1-97e99be95d24@valla.it>

> 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.
> 
> 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.
> 
> 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.
> 
> Behavior reproduced and fix tested on QEMU.
> 
> Fixes: f98cabe3f6cf ("SPI: Add virtio SPI driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Francesco Valla <francesco@valla.it>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261129-spi-virtio-restore-fix-v1-1-97e99be95d24@valla.it?part=1

      reply	other threads:[~2026-11-29 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 20:22 [PATCH] spi: virtio: move freeze/restore callbacks to virtio_driver Francesco Valla
2026-11-29 20:27 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-240009@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=francesco@valla.it \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox