Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-22 Thread Stefano Stabellini
On Wed, 21 Apr 2021, Julien Grall wrote: > Hi Stefano, > > On 21/04/2021 01:38, Stefano Stabellini wrote: > > On Tue, 20 Apr 2021, Julien Grall wrote: > > > AFAICT, there is nothing in the implementation of > > > XEN_DOMCTL_getvcpucontext > > > that justify the extra barrier (assuming we consider

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-21 Thread Julien Grall
Hi Stefano, On 21/04/2021 01:38, Stefano Stabellini wrote: On Tue, 20 Apr 2021, Julien Grall wrote: AFAICT, there is nothing in the implementation of XEN_DOMCTL_getvcpucontext that justify the extra barrier (assuming we consider vcpu_pause() as a full memory barrier). From your e-mail, I

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-20 Thread Stefano Stabellini
On Tue, 20 Apr 2021, Julien Grall wrote: > (+ Andrew and Jan) > > Hi Stefano, > > On 20/04/2021 20:38, Stefano Stabellini wrote: > > On Fri, 16 Apr 2021, Julien Grall wrote: > > > > I think your explanation is correct. However, don't we need a smp_rmb() > > > > barrier after reading

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-20 Thread Julien Grall
(+ Andrew and Jan) Hi Stefano, On 20/04/2021 20:38, Stefano Stabellini wrote: On Fri, 16 Apr 2021, Julien Grall wrote: I think your explanation is correct. However, don't we need a smp_rmb() barrier after reading v->is_initialised in xen/common/domctl.c:do_domctl ? That would be the barrier

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-20 Thread Stefano Stabellini
On Fri, 16 Apr 2021, Julien Grall wrote: > Hi Stefano, > > On 13/04/2021 23:43, Stefano Stabellini wrote: > > On Sat, 20 Mar 2021, Julien Grall wrote: > > > On 20/03/2021 00:01, Stefano Stabellini wrote: > > > > On Sat, 27 Feb 2021, Julien Grall wrote: > > > > > (+ Dario and George) > > > > > >

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-16 Thread Julien Grall
Hi Stefano, On 13/04/2021 23:43, Stefano Stabellini wrote: On Sat, 20 Mar 2021, Julien Grall wrote: On 20/03/2021 00:01, Stefano Stabellini wrote: On Sat, 27 Feb 2021, Julien Grall wrote: (+ Dario and George) Hi Stefano, I have added Dario and George to get some inputs from the scheduling

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-13 Thread Stefano Stabellini
On Sat, 20 Mar 2021, Julien Grall wrote: > On 20/03/2021 00:01, Stefano Stabellini wrote: > > On Sat, 27 Feb 2021, Julien Grall wrote: > > > (+ Dario and George) > > > > > > Hi Stefano, > > > > > > I have added Dario and George to get some inputs from the scheduling part. > > > > > > On

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-04-01 Thread Julien Grall
Hi, On 20/03/2021 11:47, Julien Grall wrote: On 20/03/2021 00:01, Stefano Stabellini wrote: On Sat, 27 Feb 2021, Julien Grall wrote: (+ Dario and George) Hi Stefano, I have added Dario and George to get some inputs from the scheduling part. On 27/02/2021 01:58, Stefano Stabellini

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-03-20 Thread Julien Grall
On 20/03/2021 00:01, Stefano Stabellini wrote: On Sat, 27 Feb 2021, Julien Grall wrote: (+ Dario and George) Hi Stefano, I have added Dario and George to get some inputs from the scheduling part. On 27/02/2021 01:58, Stefano Stabellini wrote: On Fri, 26 Feb 2021, Julien Grall wrote:

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-03-19 Thread Stefano Stabellini
On Sat, 27 Feb 2021, Julien Grall wrote: > (+ Dario and George) > > Hi Stefano, > > I have added Dario and George to get some inputs from the scheduling part. > > On 27/02/2021 01:58, Stefano Stabellini wrote: > > On Fri, 26 Feb 2021, Julien Grall wrote: > > > From: Julien Grall > > > > > > A

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-02-27 Thread Julien Grall
(+ Dario and George) Hi Stefano, I have added Dario and George to get some inputs from the scheduling part. On 27/02/2021 01:58, Stefano Stabellini wrote: On Fri, 26 Feb 2021, Julien Grall wrote: From: Julien Grall A vCPU can get scheduled as soon as _VPF_down is cleared. As there is

Re: [PATCH] xen/arm: Ensure the vCPU context is seen before clearing the _VPF_down

2021-02-26 Thread Stefano Stabellini
On Fri, 26 Feb 2021, Julien Grall wrote: > From: Julien Grall > > A vCPU can get scheduled as soon as _VPF_down is cleared. As there is > currently not ordering guarantee in arch_set_info_guest(), it may be > possible that flag can be observed cleared before the new values of vCPU > registers