QEMU/KVM: clear HF_HALTED mask at vcpu startup time
Now that threads are spinned up before machine->init(), clearing of HF_HALTED_MASK for irqchip in kernel case needs to be moved to actual vcpu startup.
Signed-off-by Marcelo Tosatti <[email protected]>
qemu/qemu-kvm.c +2 -2
@@ -325,6 +325,8 @@ static int kvm_main_loop_cpu(CPUState *env)setup_kernel_sigmask (env);pthread_mutex_lock (&qemu_mutex); +if (kvm_irqchip_in_kernel (kvm_context)) + env->hflags &= ~HF_HALTED_MASK ;kvm_qemu_init_env (env); env->ready_for_interrupt_injection =1 ;
@@ -368,8 +370,6 @@ static void *ap_main_loop(void *_env)sigprocmask (SIG_BLOCK , &signals,NULL );kvm_create_vcpu (kvm_context, env->cpu_index);kvm_qemu_init_env (env); -if (kvm_irqchip_in_kernel (kvm_context)) - env->hflags &= ~HF_HALTED_MASK ;kvm_main_loop_cpu (env);return NULL ; }
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Avi Kivity
AppliedQuoted 4 lines · Marcelo Tosatti
Now that threads are spinned up before
machine->init(), clearing ofHF_HALTED_MASKfor irqchip in kernel case needs to be moved to actual vcpu startup.
Applied, thanks.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone