From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Joshua Daley <jdaley@linux.ibm.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux.dev, mst@redhat.com,
jasowang@redhat.com, pbonzini@redhat.com, eperezma@redhat.com,
James.Bottomley@hansenpartnership.com, mjrosato@linux.ibm.com,
farman@linux.ibm.com, frankja@linux.ibm.com
Subject: Re: [PATCH v3 0/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init
Date: Fri, 20 Mar 2026 07:13:54 -0400 [thread overview]
Message-ID: <20260320111354.GA227028@fedora> (raw)
In-Reply-To: <yq14imbkzxr.fsf@ca-mkp.ca.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]
On Thu, Mar 19, 2026 at 10:19:00PM -0400, Martin K. Petersen wrote:
> > This patch avoids a kernel warning that may occur if a virtio_scsi
> > controller is detached immediately following a disk detach. See the
> > commit message for details. The following are instructions to
> > produce the warning (without the proposed patch).
>
> A few issues were flagged. Please review:
>
> https://sashiko.dev/#/patchset/20260316153341.2062278-1-jdaley%40linux.ibm.com
Hi Joshua,
I am responding to the following sashiko review comment (haven't figured
out a way to reply in the web UI or via direct email to sashiko). I feel
responsible for this one since I suggested the change that sashiko is
questioning. I haven't looked at the other review comments, please
triage them yourself.
From Sashiko:
> Does this code violate the virtio-scsi specification?
>
> The specification mandates that a driver must not place buffers into the
> event virtqueue if neither VIRTIO_SCSI_F_HOTPLUG nor VIRTIO_SCSI_F_CHANGE
> has been negotiated.
>
> By completely removing the VIRTIO_SCSI_F_HOTPLUG check without expanding it
> to check for VIRTIO_SCSI_F_CHANGE, could this unconditionally populate the
> event queue and cause strict implementations to reject the buffers or
> transition the device into a broken state?
No, this is a hallucination. The spec does not mandate that a driver
must not place buffers into the event virtqueue when neither
VIRTIO_SCSI_F_HOTPLUG nor VIRTIO_SCSI_F_CHANGE has been negotiated:
https://docs.oasis-open.org/virtio/virtio/v1.4/virtio-v1.4.html#x1-4510006
The event virtqueue still serves a purpose when both
VIRTIO_SCSI_F_HOTPLUG and VIRTIO_SCSI_F_CHANGE are not negotiated. For
example, see "Asynchronous notification subscription" and the
VIRTIO_SCSI_T_ASYNC_NOTIFY event type.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-03-20 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 15:33 [PATCH v3 0/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init Joshua Daley
2026-03-16 15:33 ` [PATCH v3 1/3] scsi: virtio_scsi: kick event_list unconditionally Joshua Daley
2026-03-16 15:33 ` [PATCH v3 2/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init Joshua Daley
2026-03-16 15:33 ` [PATCH v3 3/3] scsi: virtio_scsi: remove unnecessary fn declaration Joshua Daley
2026-03-20 2:19 ` [PATCH v3 0/3] scsi: virtio_scsi: move INIT_WORK calls to virtscsi_init Martin K. Petersen
2026-03-20 11:13 ` Stefan Hajnoczi [this message]
2026-03-23 16:16 ` Joshua Daley
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=20260320111354.GA227028@fedora \
--to=stefanha@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=eperezma@redhat.com \
--cc=farman@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=jasowang@redhat.com \
--cc=jdaley@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mjrosato@linux.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--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