Commit graph

15 commits

Author SHA1 Message Date
Paolo Bonzini feda01e40f virtio-scsi: report parameter change events
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-27 08:25:27 +02:00
Paolo Bonzini 2baa1beb1e virtio-scsi: do not report dropped events after reset
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-27 08:25:27 +02:00
Paolo Bonzini 64f64855d0 virtio-scsi: Report missed events
When an event is reported but no buffers are present in the event vq,
we can set a flag and report a dummy event as soon as one is added.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-27 08:25:27 +02:00
Cong Meng b6866fee58 virtio-scsi: Implement hotplug support for virtio-scsi
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: Sen Wang <senwang@linux.vnet.ibm.com>
Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com>
[ Add memset, fix LUN field, placate checkpatch - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-27 08:25:26 +02:00
Paolo Bonzini 619d7ae952 virtio-scsi: do not crash on adding buffers to the event queue
The event queue is not supported yet and the handler does not
have to do much anyway when buffers are added.  However, the
handler is called unconditionally by the virtio layer, and this
results in a crash as soon as buffers are added to the event
queue because we pass NULL.

Reported-by: Bryan Venteicher <bryanv@daemoninthecloset.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-07-02 11:27:00 +02:00
Anthony Liguori 0866aca1de qbus: Make child devices links
Make qbus children show up as link<> properties.  There is no stable
addressing for qbus children so we use an unstable naming convention.

This is okay in QOM though because the composition name is expected to
be what's stable.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18 15:14:38 +02:00
Orit Wassermann 2a633c461e virtio: check virtio_load return code
Otherwise we crash on error.

Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-05-21 15:40:50 -05:00
Paolo Bonzini d2ad7dd46e virtio-scsi: add multiqueue capability
Adding multiqueue is as simple as creating more than one virtqueues,
and saving the queue number for each request.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-04-19 10:31:05 +02:00
Paolo Bonzini fcf104a74c virtio-scsi: prepare migration format for multiqueue
In order to restore requests correctly from a multitude of virtqueues,
we need to store the id of the request queue that each request came
from.

Do this even for single-queue, by storing a hard-coded zero, to
simplify future implementation of multiqueue.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-04-19 10:31:05 +02:00
Paolo Bonzini eb2fa76418 virtio-scsi: call unregister_savevm properly
This fixes a use-after-free when migrating after hot-unplug.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19 16:35:43 +01:00
Paolo Bonzini 5db1764cc1 virtio-scsi: add migration support
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-24 14:54:51 +01:00
Paolo Bonzini 06114d72f6 virtio-scsi: process control queue requests
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-24 14:54:51 +01:00
Paolo Bonzini 2ccdcd8d2b virtio-scsi: add basic SCSI bus operation
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-22 13:40:06 +01:00
Stefan Hajnoczi 326799c0d0 virtio-scsi: Add basic request processing infrastructure
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-22 13:40:06 +01:00
Stefan Hajnoczi 973abc7f41 virtio-scsi: Add virtio-scsi stub device
Add a useless virtio SCSI HBA device:

  qemu -device virtio-scsi-pci

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-22 13:39:59 +01:00