qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/6] target-alpha: Fix cpu_alpha_init


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 5/6] target-alpha: Fix cpu_alpha_init
Date: Sun, 16 Sep 2012 15:01:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

Am 15.09.2012 22:24, schrieb Richard Henderson:
> Signed-off-by: Richard Henderson <address@hidden>

This is lacking a proper description. I'd be very ashamed if we lost
something so obvious during the QOM conversion. So what's the symptoms here?

Andreas

> ---
>  target-alpha/translate.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/target-alpha/translate.c b/target-alpha/translate.c
> index 12de6a3..f998f75 100644
> --- a/target-alpha/translate.c
> +++ b/target-alpha/translate.c
> @@ -3525,6 +3525,7 @@ static const struct cpu_def_t cpu_defs[] = {
>  
>  CPUAlphaState * cpu_alpha_init (const char *cpu_model)
>  {
> +    static bool inited;
>      AlphaCPU *cpu;
>      CPUAlphaState *env;
>      int implver, amask, i, max;
> @@ -3532,7 +3533,10 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
>      cpu = ALPHA_CPU(object_new(TYPE_ALPHA_CPU));
>      env = &cpu->env;
>  
> -    alpha_translate_init();
> +    if (!inited) {
> +        inited = true;
> +        alpha_translate_init();
> +    }
>  
>      /* Default to ev67; no reason not to emulate insns by default.  */
>      implver = IMPLVER_21264;
> @@ -3549,6 +3553,7 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
>      }
>      env->implver = implver;
>      env->amask = amask;
> +    env->cpu_model_str = cpu_model;
>  
>      qemu_init_vcpu(env);
>      return env;

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]