From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6U4Z-0008Mk-Is for qemu-devel@nongnu.org; Fri, 06 Nov 2009 14:02:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6U4U-0008Hn-ET for qemu-devel@nongnu.org; Fri, 06 Nov 2009 14:02:10 -0500 Received: from [199.232.76.173] (port=41253 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6U4U-0008Hc-AN for qemu-devel@nongnu.org; Fri, 06 Nov 2009 14:02:06 -0500 Received: from mail-yw0-f176.google.com ([209.85.211.176]:46640) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6U4T-0007mc-PQ for qemu-devel@nongnu.org; Fri, 06 Nov 2009 14:02:05 -0500 Received: by ywh6 with SMTP id 6so1149931ywh.4 for ; Fri, 06 Nov 2009 11:02:05 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <761ea48b0911061043i5dbaaab5td2e0d34cc4ed68a9@mail.gmail.com> References: <1257437115-22725-1-git-send-email-glommer@redhat.com> <20091106181153.GB12533@mothafucka.localdomain> <761ea48b0911061043i5dbaaab5td2e0d34cc4ed68a9@mail.gmail.com> From: Blue Swirl Date: Fri, 6 Nov 2009 21:01:45 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH] v3: don't call reset functions on cpu initialization Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Desnogues Cc: Glauber Costa , aliguori@us.ibm.com, qemu-devel@nongnu.org On Fri, Nov 6, 2009 at 8:43 PM, Laurent Desnogues wrote: > On Fri, Nov 6, 2009 at 7:11 PM, Glauber Costa 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 wrot= e: > [...] >>> > --- a/target-i386/helper.c >>> > +++ b/target-i386/helper.c >>> > @@ -1885,7 +1885,9 @@ CPUX86State *cpu_x86_init(const char *cpu_model= ) >>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return NULL; >>> > =C2=A0 =C2=A0 } >>> > =C2=A0 =C2=A0 mce_init(env); >>> > +#ifdef CONFIG_USER_ONLY >>> > =C2=A0 =C2=A0 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 p= laces, >> 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.