Re: [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

Re: [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.

[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 m...@linux.vnet.ibm.com --- block/raw-posix.c | 58 + block_int.h

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

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

[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 m...@linux.vnet.ibm.com --- drivers/scsi/virtio_scsi.c | 113 +-- include/linux/virtio_scsi.h | 18 +++ 2 files

Re: [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

Re: [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 m...@linux.vnet.ibm.com 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

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

2012-08-20 Thread Cong Meng
, this 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 m...@linux.vnet.ibm.com -- virtio-spec.lyx | 218

[PATCH v3] virtio-scsi: hotplug support for virtio-scsi

2012-07-05 Thread Cong Meng
fix Signed-off-by: Sen Wang senw...@linux.vnet.ibm.com Signed-off-by: Cong Meng m...@linux.vnet.ibm.com --- drivers/scsi/virtio_scsi.c | 113 ++- include/linux/virtio_scsi.h |9 2 files changed, 121 insertions(+), 1 deletions(-) diff --git

[PATCH v4] virtio-scsi: hotplug support for virtio-scsi

2012-07-05 Thread Cong Meng
fix v4: Cancel event works when exit. Coding type fix. Signed-off-by: Sen Wang senw...@linux.vnet.ibm.com Signed-off-by: Cong Meng m...@linux.vnet.ibm.com --- drivers/scsi/virtio_scsi.c | 127 ++- include/linux/virtio_scsi.h |9 +++ 2 files changed

[PATCH v2] virtio-scsi: hotplug support for virtio-scsi

2012-07-02 Thread Cong Meng
This patch implements the hotplug support for virtio-scsi. When there is a device attached/detached, the virtio-scsi driver will be signaled via event virtual queue and it will add/remove the scsi device in question automatically. v2: handle no_event event Signed-off-by: Cong Meng m

[PATCH] virtio-scsi: hotplug suppot for virtio-scsi

2012-06-21 Thread Cong Meng
This patch implements the hotplug support for virtio-scsi. When there is a device attached/detached, the virtio-scsi driver will be signaled via event virtual queue and it will add/remove the scsi device in question automatically. Signed-off-by: Cong Meng m...@linux.vnet.ibm.com Signed-off

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

2012-06-21 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

[PATCH 1/2] 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 m...@linux.vnet.ibm.com Signed-off-by: Sen Wang senw

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

2012-06-21 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 m...@linux.vnet.ibm.com Signed-off-by: Sen Wang senw