Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-17 Thread Julien Grall
Hi Andrew, On 16/10/17 15:38, Andrew Cooper wrote: * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until all state is actually set up. As it currently stands, d0v0 is eligible for scheduling before its registers have been set. This is latent as we also hold a

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-17 Thread Roger Pau Monné
On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: > * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >all state is actually set up. As it currently stands, d0v0 is eligible for >scheduling before its registers have been set. This is latent as we als

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-17 Thread Jan Beulich
>>> On 17.10.17 at 12:38, wrote: > On 16/10/17 17:21, Jan Beulich wrote: > On 16.10.17 at 18:07, wrote: >>> On 16/10/17 16:41, Jan Beulich wrote: >>> On 16.10.17 at 16:38, wrote: > --- a/xen/arch/x86/hvm/dom0_build.c > +++ b/xen/arch/x86/hvm/dom0_build.c > @@ -614,6 +614,7

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-17 Thread Andrew Cooper
On 16/10/17 17:21, Jan Beulich wrote: On 16.10.17 at 18:07, wrote: >> On 16/10/17 16:41, Jan Beulich wrote: >>> >>> On 16.10.17 at 16:38, wrote: --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2017, Andrew Cooper wrote: > * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >all state is actually set up. As it currently stands, d0v0 is eligible for >scheduling before its registers have been set. This is latent as we also >hold a systemc

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:51, Roger Pau Monné wrote: > On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >>all state is actually set up. As it currently stands, d0v0 is eligible >> for >>scheduling before its

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Jan Beulich
>>> On 16.10.17 at 18:07, wrote: > On 16/10/17 16:41, Jan Beulich wrote: >> >>> On 16.10.17 at 16:38, wrote: >>> --- a/xen/arch/x86/hvm/dom0_build.c >>> +++ b/xen/arch/x86/hvm/dom0_build.c >>> @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct domain *d, >>> paddr_t entry, >>> >>>

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:39, Jan Beulich wrote: On 16.10.17 at 16:49, wrote: >> On 16/10/17 15:44, Wei Liu wrote: >>> On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until all state is actually set up. As

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 16:41, Jan Beulich wrote: > >>> On 16.10.17 at 16:38, wrote: >> --- a/xen/arch/x86/hvm/dom0_build.c >> +++ b/xen/arch/x86/hvm/dom0_build.c >> @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct domain *d, >> paddr_t entry, >> >> update_domain_wallclock_time(d); >> >>

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Roger Pau Monné
On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: > * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >all state is actually set up. As it currently stands, d0v0 is eligible for >scheduling before its registers have been set. This is latent as we als

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Jan Beulich
>>> On 16.10.17 at 16:38, wrote: > --- a/xen/arch/x86/hvm/dom0_build.c > +++ b/xen/arch/x86/hvm/dom0_build.c > @@ -614,6 +614,7 @@ static int __init pvh_setup_cpus(struct domain *d, > paddr_t entry, > > update_domain_wallclock_time(d); > > +v->is_initialised = 1; > clear_bit(_V

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Jan Beulich
>>> On 16.10.17 at 16:49, wrote: > On 16/10/17 15:44, Wei Liu wrote: >> On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >>> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >>>all state is actually set up. As it currently stands, d0v0 is eligible > f

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Wei Liu
On Mon, Oct 16, 2017 at 03:49:54PM +0100, Andrew Cooper wrote: > On 16/10/17 15:44, Wei Liu wrote: > > On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: > >> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until > >>all state is actually set up. As it current

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Wei Liu
On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: > * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >all state is actually set up. As it currently stands, d0v0 is eligible for >scheduling before its registers have been set. This is latent as we als

[Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
* x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until all state is actually set up. As it currently stands, d0v0 is eligible for scheduling before its registers have been set. This is latent as we also hold a systemcontroller pause reference at the time which preven

Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures

2017-10-16 Thread Andrew Cooper
On 16/10/17 15:44, Wei Liu wrote: > On Mon, Oct 16, 2017 at 03:38:03PM +0100, Andrew Cooper wrote: >> * x86 PV and ARM dom0's must not clear _VPF_down from v->pause_flags until >>all state is actually set up. As it currently stands, d0v0 is eligible >> for >>scheduling before its registe