public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jerone Young <jyoung5@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net
Subject: Re: [PATCH 1 of 2] Add kvm_load_registers after first vcpu creation
Date: Thu, 10 Apr 2008 18:35:42 -0300	[thread overview]
Message-ID: <20080410213542.GA10283@dmt> (raw)
In-Reply-To: <a106964049c34d7a76f1.1207861487@thinkpadL>

On Thu, Apr 10, 2008 at 04:04:47PM -0500, Jerone Young wrote:
> 1 file changed, 5 insertions(+)
> qemu/qemu-kvm.c |    5 +++++
> 
>
> This patch adds a call to load_kvm_registers after creation of
> vcpu. This is required for ppc since we are required to set certain
> registers before boot. This should not have any effect on the curren
> x86 code (though I need to test this to make sure).
>
> What I would like though are some comments on the fix. Is this the
> right place for this? We had this in our platform setup code, but with
> recent code changes it will not work there anymore).
>
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> 
> diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
> --- a/qemu/qemu-kvm.c
> +++ b/qemu/qemu-kvm.c
> @@ -353,6 +353,11 @@ static void *ap_main_loop(void *_env)
>      sigdelset(&signals, SIG_IPI);
>      sigprocmask(SIG_BLOCK, &signals, NULL);
>      kvm_create_vcpu(kvm_context, env->cpu_index);
> +    if (env->cpu_index == 0) {
> +         /* load any registers set in env into 
> +            kvm  for the first guest vcpu */ 
> +        kvm_load_registers(env);
> +    }
>      kvm_qemu_init_env(env);
>      if (kvm_irqchip_in_kernel(kvm_context))
>  	env->hflags &= ~HF_HALTED_MASK;

Hi Jerone,

You can hook into PPC's kvm_arch_qemu_init_env().


-------------------------------------------------------------------------
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-10 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 21:04 [PATCH 0 of 2] Fix loading of registers preboot for PowerPC Jerone Young
2008-04-10 21:04 ` [PATCH 1 of 2] Add kvm_load_registers after first vcpu creation Jerone Young
2008-04-10 21:35   ` Marcelo Tosatti [this message]
2008-04-10 21:59     ` Jerone Young
2008-04-10 21:04 ` [PATCH 2 of 2] Remove kvm_load_registers from ppc440_bamboo board model Jerone Young

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=20080410213542.GA10283@dmt \
    --to=mtosatti@redhat.com \
    --cc=jyoung5@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=kvm-ppc-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