[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi |
Date: |
Mon, 25 Jun 2012 10:10:21 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jun 25, 2012 at 03:51:13AM -0400, address@hidden wrote:
>
> Quoting Stefan Hajnoczi <address@hidden>:
>
> >On Wed, Jun 20, 2012 at 7:47 AM, Cong Meng <address@hidden> 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 <address@hidden>
> >>Signed-off-by: Sen Wang <address@hidden>
> >>---
> >> 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?
I'm not sure what the answer is either, maybe you can find an existing
SCSI LLD that does what you need.
Stefan