public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH] execute kvm_init_vcpu in the end of pc_new_cpu
Date: Wed, 6 May 2009 10:53:06 -0300	[thread overview]
Message-ID: <20090506135306.GC10705@amt.cnet> (raw)
In-Reply-To: <1241579779-17974-1-git-send-email-glommer@redhat.com>

On Tue, May 05, 2009 at 11:16:19PM -0400, Glauber Costa wrote:
> When we create a new vcpu, we need to make sure that
> all of the state it is going to use (apic state, for example)
> already exists. We can do it nicely by making sure kvm_init_vcpu
> is executed after everything else in cpu creation.
> 
> After that, the first call to KVM_SET_LAPIC ioctl will not find an
> existant vcpu. So we introduce a function that tell us that the vcpu
> is already initialized, and is it safe to call the ioctl. Otherwise,
> just don't botter.

Why did you decide to drop the additional wait vcpu->inited thing you
had in the previous patch? I think its nice to make the synchronization
explicit. 

Isnt your current solution somewhat trickier?

And if you disagree with me (which you should avoid for safety reasons),
you need to regenerate the patch since it'll reject against qemu-kvm.git
as of today.

> We then force the execution of the KVM_SET_LAPIC from within the new
> vcpu thread.
> 
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  hw/apic.c            |   21 +++++++++++----------
>  hw/pc.c              |    2 ++
>  qemu-kvm.c           |   10 ++++++++++
>  qemu-kvm.h           |    4 ++++
>  target-i386/helper.c |    2 --
>  5 files changed, 27 insertions(+), 12 deletions(-)
> 

  reply	other threads:[~2009-05-06 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06  3:16 [PATCH] execute kvm_init_vcpu in the end of pc_new_cpu Glauber Costa
2009-05-06 13:53 ` Marcelo Tosatti [this message]
2009-05-06 14:03   ` Glauber Costa
  -- strict thread matches above, loose matches on Subject: below --
2009-05-06 14:10 Glauber Costa
2009-05-06 14:56 ` Jan Kiszka
2009-05-06 15:17   ` Glauber Costa
2009-05-06 15:43     ` Jan Kiszka

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=20090506135306.GC10705@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox