From: Badari Pulavarty <pbadari@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: kvm@vger.kernel.org
Subject: Re: [RFC] vhost-blk implementation
Date: Mon, 05 Apr 2010 16:17:45 -0700 [thread overview]
Message-ID: <1270509465.28348.12.camel@badari-desktop> (raw)
In-Reply-To: <20100405192306.GA15343@infradead.org>
On Mon, 2010-04-05 at 15:23 -0400, Christoph Hellwig wrote:
> 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.
Yes. Thats correct. I will add appropriate annotations.
>
> While we're at it here is a patch fixing the remaining sparse
> warnings in vhost-blk:
Applied.
Thanks,
Badari
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> 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();
next prev parent reply other threads:[~2010-04-05 23:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 1:00 [RFC] vhost-blk implementation Badari Pulavarty
2010-03-23 1:16 ` Anthony Liguori
2010-03-23 1:45 ` Badari Pulavarty
2010-03-23 2:00 ` Anthony Liguori
2010-03-23 2:50 ` Badari Pulavarty
2010-03-23 10:05 ` Avi Kivity
2010-03-23 14:48 ` Badari Pulavarty
2010-03-23 10:03 ` Avi Kivity
2010-03-23 14:55 ` Badari Pulavarty
2010-03-23 16:53 ` Avi Kivity
2010-03-24 20:05 ` Christoph Hellwig
2010-03-25 6:29 ` Avi Kivity
2010-03-25 15:48 ` Christoph Hellwig
2010-03-25 15:51 ` Avi Kivity
2010-03-25 15:00 ` Asdo
2010-04-05 19:59 ` Christoph Hellwig
2010-04-07 0:36 ` [RFC] vhost-blk implementation (v2) Badari Pulavarty
2010-03-23 10:09 ` [RFC] vhost-blk implementation Eran Rom
2010-03-24 20:04 ` Christoph Hellwig
2010-03-24 20:22 ` Badari Pulavarty
2010-03-25 7:57 ` Avi Kivity
2010-03-25 14:36 ` Badari Pulavarty
2010-03-25 15:57 ` Christoph Hellwig
2010-03-26 18:53 ` Eran Rom
2010-04-08 16:17 ` Stefan Hajnoczi
2010-04-05 19:23 ` Christoph Hellwig
2010-04-05 23:17 ` Badari Pulavarty [this message]
2010-03-24 20:27 ` Badari Pulavarty
2010-03-29 15:41 ` Badari Pulavarty
2010-03-29 18:20 ` Chris Wright
2010-03-29 20:37 ` Avi Kivity
2010-03-29 22:51 ` Badari Pulavarty
2010-03-29 23:56 ` Chris Wright
2010-03-30 12:43 ` Avi Kivity
2010-04-05 14:22 ` Stefan Hajnoczi
2010-04-06 2:27 ` Badari Pulavarty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270509465.28348.12.camel@badari-desktop \
--to=pbadari@us.ibm.com \
--cc=hch@infradead.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox