On Wed, Mar 24, 2010 at 01:22:37PM -0700, Badari Pulavarty wrote: > iovecs and buffers are user-space pointers (from the host kernel point > of view). They are > guest address. So, I don't need to do any set_fs tricks. >From verifying the code and using the sparse annotations it appears that the actual buffers are userspace pointers, but the iovecs in the virtqueue are kernel level pointers, so you would need some annotations. While we're at it here is a patch fixing the remaining sparse warnings in vhost-blk: Signed-off-by: Christoph Hellwig <hch@xxxxxx> Index: linux-2.6/drivers/vhost/blk.c =================================================================== --- linux-2.6.orig/drivers/vhost/blk.c 2010-04-05 21:15:11.638004250 +0200 +++ linux-2.6/drivers/vhost/blk.c 2010-04-05 21:16:13.238004599 +0200 @@ -86,7 +86,7 @@ static void handle_blk(struct vhost_blk nvecs++; BUG_ON(vq->iov[nvecs].iov_len != 1); - if (copy_to_user(vq->iov[nvecs].iov_base, &status, sizeof status) < 0) { + if (copy_to_user(vq->iov[nvecs].iov_base, &status, sizeof status)) { printk("copy to user failed\n"); vhost_discard_vq_desc(vq); break; @@ -199,7 +199,7 @@ static struct miscdevice vhost_blk_misc &vhost_blk_fops, }; -int vhost_blk_init(void) +static int vhost_blk_init(void) { int r = vhost_init(); if (r) @@ -216,7 +216,7 @@ err_init: } module_init(vhost_blk_init); -void vhost_blk_exit(void) +static void vhost_blk_exit(void) { misc_deregister(&vhost_blk_misc); vhost_cleanup(); -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html