[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane
- To: qemu-devel@xxxxxxxxxx
- From: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
- Date: Thu, 2 Dec 2021 15:34:00 +0000
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@xxxxxxxxxx
- Cc: Hanna Reitz <hreitz@xxxxxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Kevin Wolf <kwolf@xxxxxxxxxx>, "Richard W.M. Jones" <rjones@xxxxxxxxxx>, Stefano Garzarella <sgarzare@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Aarushi Mehta <mehta.aaru20@xxxxxxxxx>, Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Julia Suvorova <jusual@xxxxxxxxxx>, Juan Quintela <quintela@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Coiby Xu <Coiby.Xu@xxxxxxxxx>, qemu-block@xxxxxxxxxx, "Dr. David Alan Gilbert" <dgilbert@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefan Weil <sw@xxxxxxxxxxx>, Fam Zheng <fam@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Peter Lieven <pl@xxxxxxx>
- Delivery-date: Thu, 02 Dec 2021 15:38:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Prepare virtio_scsi_handle_cmd() to be used by both dataplane and
non-dataplane by making the condition for starting ioeventfd more
specific. This way it won't trigger when dataplane has already been
started.
Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
---
hw/scsi/virtio-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 51fd09522a..34a968ecfb 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -720,7 +720,7 @@ static void virtio_scsi_handle_cmd(VirtIODevice *vdev,
VirtQueue *vq)
/* use non-QOM casts in the data path */
VirtIOSCSI *s = (VirtIOSCSI *)vdev;
- if (s->ctx) {
+ if (s->ctx && !s->dataplane_started) {
virtio_device_start_ioeventfd(vdev);
if (!s->dataplane_fenced) {
return;
--
2.33.1
|