All of lore.kernel.org
 help / color / mirror / Atom feed
From: mc@linux.vnet.ibm.com
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: stefanha@linux.vnet.ibm.com, zwanp@cn.ibm.com,
	linuxram@us.ibm.com, qemu-devel@nongnu.org,
	senwang@linux.vnet.ibm.com,
	"Anthony Liguori" <anthony@codemonkey.ws>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	virtualization@lists.linux-foundation.org,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi
Date: Mon, 25 Jun 2012 03:51:13 -0400	[thread overview]
Message-ID: <20120625035113.Horde.eaU3vZir309P6Bhxk01CidA@imap.linux.ibm.com> (raw)
In-Reply-To: <CAJSP0QWoRt-GgWytPpSBEjNDtSHHRXOs7hDnyUpspW-knYPY5g@mail.gmail.com>


Quoting Stefan Hajnoczi <stefanha@gmail.com>:

> On Wed, Jun 20, 2012 at 7:47 AM, Cong Meng <mc@linux.vnet.ibm.com> wrote:
>> Implement the hotplug() and hot_unplug() interfaces in virtio-scsi,  
>> by signal
>> the virtio_scsi.ko in guest kernel via event virtual queue.
>>
>> The counterpart patch of virtio_scsi.ko will be sent soon in another thread.
>
>> Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com>
>> Signed-off-by: Sen Wang <senwang@linux.vnet.ibm.com>
>> ---
>>  hw/virtio-scsi.c |   72  
>> +++++++++++++++++++++++++++++++++++++++++++++++++++--
>>  1 files changed, 69 insertions(+), 3 deletions(-)
>
> I compared against the virtio-scsi specification and this looks good:
> http://ozlabs.org/~rusty/virtio-spec/virtio-0.9.5.pdf
>
> Dropped events and event throttling are not implemented by this patch.
>  This means that the guest can miss events if it runs out of event
> queue elements.  A scenario that might be able to trigger this is if
> multiple LUNs are hotplugged in a single QEMU monitor callback.
>
> Implementing dropped events is easy in hw/virtio-scsi.c.  Keep a bool
> or counter of dropped events and report them when the guest kicks us
> with a free event element (virtio_scsi_handle_event).

Yes. It's easy to do this in qemu. But I'm not sure what should be done
in virtio-scsi.ko to respond the "VIRTIO_SCSI_T_EVENTS_MISSED" event.
The spec says "poll the logical units for unit attention conditions", or
just a whole bus rescan?

>
> Stefan

  reply	other threads:[~2012-06-25  7:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  6:47 [Qemu-devel] [PATCH 0/2] Hotplug support for virtio-scsi Cong Meng
2012-06-20  6:47 ` [PATCH 1/2] scsi bus: introduce hotplug() and hot_unplug() interfaces for SCSI bus Cong Meng
2012-06-20  6:47 ` [Qemu-devel] " Cong Meng
2012-06-20 13:10   ` Andreas Färber
2012-06-20 13:10   ` Andreas Färber
2012-06-20  6:47 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi Cong Meng
2012-06-21 10:56   ` Stefan Hajnoczi
2012-06-21 10:56     ` Stefan Hajnoczi
2012-06-25  7:51     ` mc [this message]
2012-06-25  9:10       ` Stefan Hajnoczi
2012-06-20  6:47 ` Cong Meng

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=20120625035113.Horde.eaU3vZir309P6Bhxk01CidA@imap.linux.ibm.com \
    --to=mc@linux.vnet.ibm.com \
    --cc=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=linuxram@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=senwang@linux.vnet.ibm.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zwanp@cn.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.