xen/dom0: Fix latent dom0 construction bugs on all architectures
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 16 Oct 2017 13:20:00 +0000 (13:20 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Oct 2017 13:47:05 +0000 (14:47 +0100)
commit0075bc1f02c389c5bb84cbffdc27dc9b53699bca
tree70c870cdc68aaa45a0f63d1ba113c92e005a2760
parent24fb44e971a62b345c7b6ca3c03b454a1e150abe
xen/dom0: Fix latent dom0 construction bugs on all architectures

 * 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 prevents d0 from
   being scheduled.

 * x86 PVH previously was not setting v->is_initialised for d0v0, despite
   setting the vcpu running eventually.  Therefore, a later VCPUOP_initialise
   hypercall will modify state under the feet of the running vcpu.  This is
   latent as PVH dom0 construction don't yet function.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/domain_build.c
xen/arch/x86/dom0_build.c
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/pv/dom0_build.c