qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initiali


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization
Date: Fri, 6 Nov 2009 20:05:40 +0200

On Thu, Nov 5, 2009 at 6:05 PM, Glauber Costa <address@hidden> wrote:
> There is absolutely no need to call reset functions when initializing
> devices. Since we are already registering them, calling qemu_system_reset()
> should suffice. Actually, it is what happens when we reboot the machine,
> and using the same process instead of a special case semantics will even
> allow us to find bugs easier.
>
> Furthermore, the fact that we initialize things like the cpu quite early,
> leads to the need to introduce synchronization stuff like qemu_system_cond.
> This patch removes it entirely. All we need to do is call qemu_system_reset()
> only when we're already sure the system is up and running

Nice idea. But shouldn't you remove all calls to reset functions, not
just some random x86 ones?

> --- a/target-i386/helper.c
> +++ b/target-i386/helper.c
> @@ -1885,7 +1885,9 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
>         return NULL;
>     }
>     mce_init(env);
> +#ifdef CONFIG_USER_ONLY
>     cpu_reset(env);
> +#endif

Please push the call to *-user/main.c, just after call to cpu_init().




reply via email to

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