Re: [Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-23 Thread Cong Meng
On Wed 22 Aug 2012 10:13:44 PM CST, Paolo Bonzini wrote: Il 22/08/2012 15:13, Stefan Hajnoczi ha scritto: http://lists.gnu.org/archive/html/qemu-devel/2010-12/msg01741.html "This is a real problem in practice. IE. the USB CD-ROM on this POWER7 blade limits transfers to 0x1e000 bytes for examp

Re: [Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-22 Thread Cong Meng
On 08/21/2012 06:14 PM, Paolo Bonzini wrote: Il 21/08/2012 11:52, Stefan Hajnoczi ha scritto: Using /sys/dev/block or /sys/dev/char seems easier, and lets you retrieve the parameters for block devices too. what do you mean with "block devices"? Using "/dev/sda" instead of "/dev/sg0"? Yes

Re: [Qemu-devel] [PATCH v1] virtio-scsi: get and set the queue limits for sg device

2012-08-21 Thread Cong Meng
On Tue 21 Aug 2012 04:53:59 PM CST, Stefan Hajnoczi wrote: On Tue, Aug 21, 2012 at 9:26 AM, Cong Meng wrote: Each virtio scsi HBA has global request queue limits. But the passthrough LUNs (scsi-generic) come from different host HBAs may have different request queue limits. If the guest sends

Re: [Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-21 Thread Cong Meng
On Tue 21 Aug 2012 04:48:17 PM CST, Paolo Bonzini wrote: Il 21/08/2012 10:23, Cong Meng ha scritto: +static void sg_get_queue_limits(BlockDriverState *bs, const char *filename) +{ +DIR *ffs; +struct dirent *d; +char path[MAXPATHLEN]; + +snprintf(path, MAXPATHLEN

[Qemu-devel] [PATCH v1] virtio-scsi: get and set the queue limits for sg device

2012-08-21 Thread Cong Meng
by getting the per-LUN queue limits via the the newly added virtio control request, then setting them properly. Signed-off-by: Cong Meng --- drivers/scsi/virtio_scsi.c | 113 +-- include/linux/virtio_scsi.h | 18 +++ 2 files changed, 116 insertions

[Qemu-devel] [PATCH 2/2 v1] virtio-scsi: set per-LUN queue limits for sg devices

2012-08-21 Thread Cong Meng
patch responses the newly added virtio control queue request by returning the per-LUN queue limits. Signed-off-by: Cong Meng --- hw/virtio-scsi.c | 65 ++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio

[Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-21 Thread Cong Meng
This patch adds some queue limit parameters into block drive. And inits them for sg block drive. Some interfaces are also added for accessing them. Signed-off-by: Cong Meng --- block/raw-posix.c | 58 + block_int.h |4

[Qemu-devel] [PATCH] virtio-scsi spec: add per-LUN parameter query

2012-08-20 Thread Cong Meng
patch adds a per-LUN parameter query via the control queue, and defines some parameter query types. The driver can query and set the needed per-LUN parameters if the device enables this feature. Signed-off-by: Cong Meng -- virtio-spec.lyx | 218

[Qemu-devel] [PATCH] add support for ATA_PASSTHROUGH_xx scsi command

2012-08-02 Thread Cong Meng
Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. ChangeLog: v2: For opcode 0xa1 on TYPE_ROM device, do not calc the xfer size v3: Complete xfer calculation of all situations Signed-off-by: Cong Meng --- hw/scsi-bus.c | 90

Re: [Qemu-devel] [PATCH v2] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
On Wed 01 Aug 2012 05:42:08 PM CST, Paolo Bonzini wrote: Il 01/08/2012 11:05, Cong Meng ha scritto: +case ATA_PASSTHROUGH_12: +if (dev->type != TYPE_ROM) { +if ((buf[2] & 0x3) == 2) { +cmd->xfer = buf[4] * dev-

[Qemu-devel] [PATCH v2] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. ChangeLog: v2: For opcode 0xa1 on TYPE_ROM device, do not calc the xfer size Signed-off-by: Cong Meng --- hw/scsi-bus.c | 19 --- hw/scsi-defs.h |4 ++-- 2 files changed, 18

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
, Paolo Bonzini wrote: Il 01/08/2012 10:43, Cong Meng ha scritto: Please make this conditional on the type _not_ being TYPE_ROM. May I ask why cdrom device should be an exception? Because CD-ROM devices do not support ATA PASSTHROUGH (the SAT standard only describes direct access devices---type

Re: [Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
On Wed 01 Aug 2012 04:20:28 PM CST, Paolo Bonzini wrote: Il 01/08/2012 09:53, Cong Meng ha scritto: Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng --- hw/scsi-bus.c | 17 ++--- hw/scsi-defs.h |4

[Qemu-devel] [PATCH] add suport for ATA_PASSTHROUGH_xx scsi command

2012-08-01 Thread Cong Meng
Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng --- hw/scsi-bus.c | 17 ++--- hw/scsi-defs.h |4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index

[Qemu-devel] [PATCH 1/2 v2] scsi bus: introduce hotplug() and hot_unplug() interfaces for SCSI bus

2012-06-21 Thread Cong Meng
Add two interfaces hotplug() and hot_unplug() to scsi bus info. The embody scsi bus can implement these two interfaces to signal the HBA driver of guest kernel to add/remove the scsi device in question. Signed-off-by: Cong Meng Signed-off-by: Sen Wang --- hw/scsi-bus.c | 16

[Qemu-devel] [PATCH 1/2] scsi bus: introduce hotplug() and hot_unplug() interfaces for SCSI bus

2012-06-19 Thread Cong Meng
Add two interfaces hotplug() and hot_unplug() to scsi bus info. The embody scsi bus can implement these two interfaces to signal the HBA driver of guest kernel to add/remove the scsi device in question. Signed-off-by: Cong Meng Signed-off-by: Sen Wang --- hw/scsi-bus.c | 16

[Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi

2012-06-19 Thread Cong Meng
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 Signed-off-by: Sen Wang --- hw/virtio-scsi.c | 72

[Qemu-devel] [PATCH 0/2] Hotplug support for virtio-scsi

2012-06-19 Thread Cong Meng
These patches implement the hotplug support for virtio-scsi. When a new device attaches/detaches to virtio-scsi bus via device_add/device_del commands, the HBA driver in guest kernel will be signaled to add/remove the scsi device. Cong Meng (2): scsi bus: introduce hotplug() and hot_unplug

Re: [Qemu-devel] IO performance test on the tcm-vhost scsi

2012-06-14 Thread Cong Meng
On Wed, 2012-06-13 at 12:08 -0700, Nicholas A. Bellinger wrote: > On Wed, 2012-06-13 at 18:13 +0800, mengcong wrote: > > Hi folks, I did an IO performance test on the tcm-vhost scsi. I want to > > share > > the test result data here. > > > > > > seq-readseq-write

Re: [Qemu-devel] IO performance test on the tcm-vhost scsi

2012-06-14 Thread Cong Meng
e \ -device virtio-scsi-pci,id=mcbus \ -device scsi-disk,drive=sdb there is only one scsi HBA. /dev/sdb is the disk on which all tests have been done. Is this what you want? Cong Meng > Stefan >