On Tue, 2011-11-29 at 10:31 +0400, Cyrill Gorcunov wrote:
> 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?
On the kernel side.
Theres a mb there which happens there during the kick.
--
Sasha.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html