All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization
Date: Fri, 6 Nov 2009 16:11:53 -0200	[thread overview]
Message-ID: <20091106181153.GB12533@mothafucka.localdomain> (raw)
In-Reply-To: <f43fc5580911061005l3fa4b23i17b52f7b9fc0f7fe@mail.gmail.com>

On Fri, Nov 06, 2009 at 08:05:40PM +0200, Blue Swirl wrote:
> On Thu, Nov 5, 2009 at 6:05 PM, Glauber Costa <glommer@redhat.com> 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.

  reply	other threads:[~2009-11-06 18:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05 16:05 [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization Glauber Costa
2009-11-06 18:05 ` Blue Swirl
2009-11-06 18:11   ` Glauber Costa [this message]
2009-11-06 18:43     ` Laurent Desnogues
2009-11-06 19:01       ` Blue Swirl
2009-11-06 19:13         ` Laurent Desnogues
2009-11-06 19:36           ` Blue Swirl
2009-11-06 19:50             ` Laurent Desnogues
2009-11-06 19:54               ` Blue Swirl
2009-11-06 20:41         ` Glauber Costa
2009-11-07  8:40           ` Blue Swirl
2009-11-07 16:02             ` Laurent Desnogues
2009-11-07 16:11               ` Blue Swirl
2009-11-07 16:15                 ` Laurent Desnogues

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=20091106181153.GB12533@mothafucka.localdomain \
    --to=glommer@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.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.