From: Paolo Bonzini <pbonzini@redhat.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
"Nicholas A. Bellinger" <nab@daterainc.com>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
kvm-devel <kvm@vger.kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT
Date: Thu, 09 Oct 2014 10:49:47 +0200 [thread overview]
Message-ID: <54364C2B.5000206@redhat.com> (raw)
In-Reply-To: <1412828062.31947.50.camel@haakon3.risingtidesystems.com>
Il 09/10/2014 06:14, Nicholas A. Bellinger ha scritto:
> AFAICT from qemu code, the ioctl VHOST_SCSI_CLEAR_ENDPOINT is always
> called during shutdown in order to release the endpoint and drop this
> new configfs dependency.
As far as I can see, the only path leading to the ioctl is
vhost_scsi_set_status->vhost_scsi_stop. That only happens if the guest
driver resets the device upon shutdown, or via vhost_scsi_unrealize as
you pointed out. But unrealize() is only called when a device is
hot-unplugged.
It does not happen if you close QEMU with SIGTERM, ctrl-c, or with the
"quit" command, because no attempt is done to bring down the VM data
structures (or free memory, or close file descriptors) in case of a
fatal exit. The kernel should do that for us.
Besides that...
> The question is, what happens when qemu crashes..? Is there currently
> an assurance that VHOST_SCSI_CLEAR_ENDPOINT is called via the normal
> VirtioDeviceClass->unrealize() when qemu exits abnormally..?
... of course nothing is called if you SIGKILL QEMU.
Paolo
next prev parent reply other threads:[~2014-10-09 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 3:34 [PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT Nicholas A. Bellinger
2014-10-09 4:14 ` Nicholas A. Bellinger
2014-10-09 8:49 ` Paolo Bonzini [this message]
2014-10-09 10:49 ` Paolo Bonzini
2014-10-21 19:05 ` Nicholas A. Bellinger
2014-10-21 22:23 ` Michael S. Tsirkin
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=54364C2B.5000206@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mst@redhat.com \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--cc=stefanha@redhat.com \
--cc=target-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).