[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] [PATCH v2 2/3] xenfb: move xen_rmb to the c
Re: [Qemu-devel] [Xen-devel] [PATCH v2 2/3] xenfb: move xen_rmb to the correct location
Tue, 12 Apr 2016 14:46:03 +0100
On Tue, Apr 12, 2016 at 02:38:13PM +0100, Andrew Cooper wrote:
> On 12/04/16 13:57, David Vrabel wrote:
> > On 12/04/16 11:43, Wei Liu wrote:
> >> It should be placed before first time producer and consumer are used.
> > This change isn't necessary and is confusing as this is not what this
> > barrier is for.
> > The barrier needs to be between the load of prod and the load of the
> > ring contents (there's even a comment that says this). This pairs with
> > the corresponding write barrier between the store of the ring contents
> > and the store of prod (in the other end).
> Looking further, this code will compile to multiple reads of the page,
> because there is no ACCESS_ONCE(). This code is still vulnerable to
Oops, accidentally kicked over a can of worms. Should have just sent
patch 1. :-)
Jokes aside, more time is needed to fix this properly. So maybe we
should just upstream patch #1 first. Stefano? Anthony?