[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 3/4] move halted state setting to inside of cpu_
From: |
Jan Kiszka |
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 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] [PATCH 0/4] Simplify cpu initialization, Glauber Costa, 2009/05/06
- [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Jan Kiszka, 2009/05/06
- [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Glauber Costa, 2009/05/06
- RE: [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Stanislav, 2009/05/06
- Re: [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Glauber Costa, 2009/05/06
- RE: [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Stanislav, 2009/05/06
- Re: [Qemu-devel] Re: [PATCH 2/4] move CPUID_APIC flag to where it belongs, Anthony Liguori, 2009/05/06
[Qemu-devel] Re: [PATCH 1/4] move registering of cpu_reset to inside cpu_init, Jan Kiszka, 2009/05/06
Re: [Qemu-devel] [PATCH 1/4] move registering of cpu_reset to inside cpu_init, Blue Swirl, 2009/05/06