On Mon, Nov 28, 2011 at 07:54:27PM +0200, Sasha Levin wrote:
>  
> +/*
> + * Each buffer in the virtqueues is actually a chain of descriptors.  This
> + * function returns the next descriptor in the chain, or vq->vring.num if 
> we're
> + * at the end.
> + */
> +static unsigned next_desc(struct vring_desc *desc,
> +                       unsigned int i, unsigned int max)
> +{
> +     unsigned int next;
> +
> +     /* If this descriptor says it doesn't chain, we're done. */
> +     if (!(desc[i].flags & VRING_DESC_F_NEXT))
> +             return max;
> +
> +     /* Check they're not leading us off end of descriptors. */
> +     next = desc[i].next;
> +     /* Make sure compiler knows to grab that: we don't want it changing! */
> +     wmb();
> +
> +     return next;
> +}
> +

Hi Sasha, where the rmb() then? Or maybe you wanted plain barrier() here?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to