[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.10] xen/dom0: Fix latent dom0 construction bugs on all architectures
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 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 dom0's must set v->is_initialised on d0v0, to prevent another vcpu >> being able to call VCPUOP_initialise and 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@xxxxxxxxxx> > LGTM, just one question. > >> diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c >> index e8f746c..a67071c 100644 >> --- 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(_VPF_down, &v->pause_flags); > Don't you want to move this to the end of dom0_construct_pvh? In any > case, at this point the vCPU state is already setup correctly. I had considered that, but a) As you say, it only matters when the vcpu state is set up, and b) it would look odd being anywhere later. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |