> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Sent: 16 September 2020 10:04
> To: Oleksandr Tyshchenko <olekst...@gmail.com>
> Cc: xen-devel@lists.xenproject.org; Oleksandr Tyshchenko 
> <oleksandr_tyshche...@epam.com>; Paul Durrant
> <p...@xen.org>; Julien Grall <jul...@xen.org>; Stefano Stabellini 
> <sstabell...@kernel.org>; Julien
> Grall <jgr...@amazon.com>
> Subject: Re: [PATCH V1 14/16] xen/ioreq: Use guest_cmpxchg64() instead of 
> cmpxchg()
> 
> On 10.09.2020 22:22, Oleksandr Tyshchenko wrote:
> > @@ -1325,7 +1327,7 @@ static int hvm_send_buffered_ioreq(struct 
> > hvm_ioreq_server *s, ioreq_t *p)
> >
> >          new.read_pointer = old.read_pointer - n * IOREQ_BUFFER_SLOT_NUM;
> >          new.write_pointer = old.write_pointer - n * IOREQ_BUFFER_SLOT_NUM;
> > -        cmpxchg(&pg->ptrs.full, old.full, new.full);
> > +        guest_cmpxchg64(d, &pg->ptrs.full, old.full, new.full);
> 
> But the memory we're updating is shared with s->emulator, not with d,
> if I'm not mistaken.
> 

You're not mistaken.

  Paul

> Jan


Reply via email to