public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>,
	kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: QEMU/KVM: clear HF_HALTED mask at vcpu startup time
Date: Thu, 17 Apr 2008 19:30:57 -0300	[thread overview]
Message-ID: <20080417223057.GA13186@dmt> (raw)


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 <mtosatti@redhat.com>

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index f7a217a..50589a7 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -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

             reply	other threads:[~2008-04-17 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 22:30 Marcelo Tosatti [this message]
2008-04-20  7:45 ` QEMU/KVM: clear HF_HALTED mask at vcpu startup time Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080417223057.GA13186@dmt \
    --to=mtosatti@redhat.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox