Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-22 Thread Fam Zheng
On Fri, 09/19 11:29, Paolo Bonzini wrote: Il 06/08/2014 07:35, Fam Zheng ha scritto: +void virtio_scsi_dataplane_start(VirtIOSCSICommon *s) +{ +int i; +int rc; +BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s))); +VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); +

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-22 Thread Paolo Bonzini
Il 22/09/2014 07:56, Fam Zheng ha scritto: Please add these to VirtIOSCSI rather than VirtIOSCSICommon. Same for the new functions you declare below. What's the rationale, please? Asking because especially the VirtIOSCSIVring fields are the dataplane counterparts of VirtQueue fields, so

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-22 Thread Fam Zheng
On Mon, 09/22 10:09, Paolo Bonzini wrote: Il 22/09/2014 07:56, Fam Zheng ha scritto: Please add these to VirtIOSCSI rather than VirtIOSCSICommon. Same for the new functions you declare below. What's the rationale, please? Asking because especially the VirtIOSCSIVring fields are the

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-21 Thread Fam Zheng
On Fri, 09/19 11:29, Paolo Bonzini wrote: Il 06/08/2014 07:35, Fam Zheng ha scritto: diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index 6f92c29..b9f2197 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -174,6

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: This implements the core part of dataplane feature of virtio-scsi. A few fields are added in VirtIOSCSICommon to maintain the dataplane status. These fields are managed by a new source file: virtio-scsi-dataplane.c. Most code in this file will

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-06 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: ifeq ($(CONFIG_VIRTIO),y) -obj-y += virtio-scsi.o +obj-y += virtio-scsi.o virtio-scsi-dataplane.o obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o endif I first thought that this must be conditional on CONFIG_VIRTIO_BLK_DATA_PLANE. However,

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-06 Thread Fam Zheng
On Wed, 08/06 10:45, Paolo Bonzini wrote: Il 06/08/2014 07:35, Fam Zheng ha scritto: ifeq ($(CONFIG_VIRTIO),y) -obj-y += virtio-scsi.o +obj-y += virtio-scsi.o virtio-scsi-dataplane.o obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o endif I first thought that this must be conditional on

[Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-05 Thread Fam Zheng
This implements the core part of dataplane feature of virtio-scsi. A few fields are added in VirtIOSCSICommon to maintain the dataplane status. These fields are managed by a new source file: virtio-scsi-dataplane.c. Most code in this file will run on an iothread, unless otherwise commented as in