lkml.org 
[lkml]   [2008]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/5] vringfd base/offset
Rusty Russell wrote:
> It turns out the lguest (and possibly kvm) want the addresses in the
> ring buffer to only cover a certain part of memory, and be offset.
>
> It makes sense that this be an ioctl.
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>

<snip>

> @@ -208,12 +232,15 @@ int vring_get_buffer(struct vring_info *
> out_len = &dummy;
>
> *in_len = *out_len = 0;
> -
> - if (unlikely(get_user(head, &vr->ring.avail->ring[head]) != 0))
> +
> + if (unlikely(get_user(head, &vr->ring.avail->ring[vr->last_avail
> + % vr->ring.num])))

Why not & with vr->mask for the sake of consistency with the rest of the
code.

Regards,

Anthony Liguori


\
 
 \ /
  Last update: 2008-04-05 19:21    [W:0.145 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site