All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Glauber Costa <glommer@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/4] move halted state setting to inside of cpu_x86_init
Date: Wed, 06 May 2009 17:45:57 +0200	[thread overview]
Message-ID: <4A01B0B5.1030105@siemens.com> (raw)
In-Reply-To: <1241621382-21577-4-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
> cpus other than the first one starting at the halted state
> is a safe assumption to anyone. Move it to where it belongs.
> 
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
>  hw/pc.c              |    2 --
>  target-i386/helper.c |    3 +++
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/pc.c b/hw/pc.c
> index b726c17..06d1fca 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -849,8 +849,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
>              fprintf(stderr, "Unable to find x86 CPU definition\n");
>              exit(1);
>          }
> -        if (i != 0)
> -            env->halted = 1;
>          if (pci_enabled) {
>              apic_init(env);
>          }
> diff --git a/target-i386/helper.c b/target-i386/helper.c
> index 2c11cd3..a0d0273 100644
> --- a/target-i386/helper.c
> +++ b/target-i386/helper.c
> @@ -1694,6 +1694,9 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
>          cpu_x86_close(env);
>          return NULL;
>      }
> +
> +    /* cpu 0 can run, others start at halted state */
> +    env->halted = !!env->cpu_index;
>      cpu_reset(env);
>      qemu_register_reset(main_cpu_reset, env);
>  

That looks good to me.

Jan


-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  parent reply	other threads:[~2009-05-06 15:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 14:49 [Qemu-devel] [PATCH 0/4] Simplify cpu initialization Glauber Costa
2009-05-06 14:49 ` [Qemu-devel] [PATCH 1/4] move registering of cpu_reset to inside cpu_init Glauber Costa
2009-05-06 14:49   ` [Qemu-devel] [PATCH 2/4] move CPUID_APIC flag to where it belongs Glauber Costa
2009-05-06 14:49     ` [Qemu-devel] [PATCH 3/4] move halted state setting to inside of cpu_x86_init Glauber Costa
2009-05-06 14:49       ` [Qemu-devel] [PATCH 4/4] move apic functions to a separate apic.h header Glauber Costa
2009-05-06 15:52         ` [Qemu-devel] " Jan Kiszka
2009-05-06 16:08           ` Glauber Costa
2009-05-06 15:45       ` Jan Kiszka [this message]
2009-05-06 19:31       ` [Qemu-devel] [PATCH 3/4] move halted state setting to inside of cpu_x86_init Blue Swirl
2009-05-06 21:42         ` Glauber Costa
2009-05-06 15:40     ` [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs Jan Kiszka
2009-05-06 15:51       ` Glauber Costa
2009-05-06 17:29         ` Stanislav
2009-05-06 17:41           ` Glauber Costa
2009-05-06 17:43             ` Stanislav
2009-05-06 18:17           ` Anthony Liguori
2009-05-06 17:02   ` [Qemu-devel] Re: [PATCH 1/4] move registering of cpu_reset to inside cpu_init Jan Kiszka
2009-05-06 19:36   ` [Qemu-devel] " Blue Swirl
2009-05-06 21:45     ` Glauber Costa

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=4A01B0B5.1030105@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.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.