[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initializ
From: |
Glauber Costa |
Subject: |
Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization |
Date: |
Fri, 6 Nov 2009 16:11:53 -0200 |
User-agent: |
Jack Bauer |
On Fri, Nov 06, 2009 at 08:05:40PM +0200, Blue Swirl wrote:
> 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?
Yes, but I can't test it, so I don't feel comfortable.
After the patch is merged, others can remove their own too.
>
> > --- 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().
I'd prefer it that way too. But cpu_reset is also called in some other places,
and Laurent suggested me to to this way.
I don't really know much about -user, so I'm fine with whatever you guys agree
on.
- [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Glauber Costa, 2009/11/05
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization,
Glauber Costa <=
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Laurent Desnogues, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Laurent Desnogues, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Laurent Desnogues, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Glauber Costa, 2009/11/06
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/07
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Laurent Desnogues, 2009/11/07
- Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization, Blue Swirl, 2009/11/07