On Fri, Nov 6, 2009 at 10:41 PM, Glauber Costa <glom...@redhat.com> wrote: > On Fri, Nov 06, 2009 at 09:01:45PM +0200, Blue Swirl wrote: >> On Fri, Nov 6, 2009 at 8:43 PM, Laurent Desnogues >> <laurent.desnog...@gmail.com> wrote: >> > On Fri, Nov 6, 2009 at 7:11 PM, Glauber Costa <glom...@redhat.com> wrote: >> >> On Fri, Nov 06, 2009 at 08:05:40PM +0200, Blue Swirl wrote: >> >>> On Thu, Nov 5, 2009 at 6:05 PM, Glauber Costa <glom...@redhat.com> wrote: >> > [...] >> >>> > --- 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. >> > >> > Yes, you'd have to remove all calls to cpu_reset from all CPUs. >> > And also add a call to cpu_reset to cpu_copy. >> > >> >> I don't really know much about -user, so I'm fine with whatever you guys >> >> agree on. >> > >> > I honestly don't care that much as long as all targets still work >> > in user mode :-) >> > >> > The aim was to make Glauber's patch less intrusive. >> >> Given that only the new calls to cpu_reset are important and the >> removals are much less so (double reset shouldn't be a problem), the >> least intrusive version would be to just add the new calls and do the >> clean up later. > Which IMHO, pretty much means apply it this way, and then later on move > the reset functions elsewhere for -user, if one wants to.
Thanks, applied. While testing I noticed that the poor x86 emulator does not survive even five system_resets until BIOS refuses to boot. This happens without your patch. In comparison, I see no problems resetting Sparc32, Sparc64 or PPC.