On Wed, May 27, 2026 at 05:00:46AM +0000, Aastha Rawat wrote: > From: Magnus Kulke <[email protected]> > > In MSHV the hypervisor APIC is always used, so we to implement this hook > to make sure the AP's vcpu thread is not blocked waiting for an INIT SIPI > by the BSP. Without this change soft reboots with -smp cpus>=2 will > hang. > > Signed-off-by: Magnus Kulke <[email protected]> > Reviewed-by: Mohamed Mediouni <[email protected]> > Signed-off-by: Aastha Rawat <[email protected]> > --- > accel/mshv/mshv-all.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c > index 927e1b39bb..61a9d58546 100644 > --- a/accel/mshv/mshv-all.c > +++ b/accel/mshv/mshv-all.c > @@ -719,11 +719,23 @@ static const TypeInfo mshv_accel_type = { > .instance_size = sizeof(MshvState), > }; > > +/* > + * Haulted vCPUs must still enter mshv_cpu_exec() so that MSHV_RUN_VP > + * is called and the hypervisor can wake them (via SIPI on x86 or > + * PSCI on ARM64). > + */ > + > +static bool mshv_vcpu_thread_is_idle(CPUState *cpu) > +{ > + return false; > +} > + > static void mshv_accel_ops_class_init(ObjectClass *oc, const void *data) > { > AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); > > ops->create_vcpu_thread = mshv_start_vcpu_thread; > + ops->cpu_thread_is_idle = mshv_vcpu_thread_is_idle; > ops->synchronize_post_init = mshv_cpu_synchronize_post_init; > ops->synchronize_post_reset = mshv_cpu_synchronize_post_reset; > ops->synchronize_state = mshv_cpu_synchronize; > > -- > 2.45.4
this has been merged independently since: dbfb680772d5184544f7c0a8bba96bec229c96e6 best, magnus
