All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, aliguori@us.ibm.com
Subject: Re: [PATCH] remove kvm_init_ap from qemu code.
Date: Wed, 24 Sep 2008 12:37:05 +0300	[thread overview]
Message-ID: <48DA0A41.7090507@redhat.com> (raw)
In-Reply-To: <1222201515-8881-1-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
> Call it as a special case for cpu 0 creation. This removes
> a piece of kvm code from raw qemu.
>  
> +void kvm_init_new_ap(int cpu, CPUState *env)
> +{
> +    if (!cpu)
> +        kvm_init_ap();
> +
> +    pthread_create(&vcpu_info[cpu].thread, NULL, ap_main_loop, env);
> +
> +    while (vcpu_info[cpu].created == 0)
> +	qemu_cond_wait(&qemu_vcpu_cond);
> +}
> +
>   

kvm_init_ap() is machine-level initialization.  It's hacky to call it 
from cpu-level initialization.

Do we have a machine-level initialization hook?


[btw, !x makes sense when x is a boolean, pointer, or count.  Then it 
means "there is no x" or "there are no xs".  But when x is an index, !x 
means "x equals 0", so you may as well write that.

and don't get me started on !strcmp()]

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2008-09-24  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 20:25 [PATCH] remove kvm_init_ap from qemu code Glauber Costa
2008-09-24  9:37 ` Avi Kivity [this message]

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=48DA0A41.7090507@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.