On Mon, Feb 16, 2026 at 04:54:30PM +0100, Jan Beulich wrote: > Nothing hypercall-related needs setting up there. Nor do we need to > check whether the idle domain is shutting down - it never will. > > Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Roger Pau Monné <[email protected]> > --- > v2: Drop vmtrace_alloc_buffer() part. > > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -475,12 +475,6 @@ struct vcpu *vcpu_create(struct domain * > v->vcpu_id = vcpu_id; > v->dirty_cpu = VCPU_CPU_CLEAN; > > - rwlock_init(&v->virq_lock); > - > - tasklet_init(&v->continue_hypercall_tasklet, NULL, NULL); > - > - grant_table_init_vcpu(v); > - > if ( is_idle_domain(d) ) > { > v->runstate.state = RUNSTATE_running; > @@ -488,6 +482,12 @@ struct vcpu *vcpu_create(struct domain * > } > else > { > + rwlock_init(&v->virq_lock); > + > + tasklet_init(&v->continue_hypercall_tasklet, NULL, NULL); > + > + grant_table_init_vcpu(v); > + > v->runstate.state = RUNSTATE_offline; > v->runstate.state_entry_time = NOW(); > set_bit(_VPF_down, &v->pause_flags); > @@ -516,7 +516,8 @@ struct vcpu *vcpu_create(struct domain * > } > > /* Must be called after making new vcpu visible to for_each_vcpu(). */ > - vcpu_check_shutdown(v); > + if ( !is_idle_domain(d) ) > + vcpu_check_shutdown(v); I would possibly leave this as-is. I agree that the idle domain will never shut down, but it's possibly best to needlessly call into vcpu_check_shutdown() for the idle domain rather than adding the extra conditional for the common case? My Ack stands regardless. Thanks, Roger.
