From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kd6QX-0005N9-Sa for qemu-devel@nongnu.org; Tue, 09 Sep 2008 12:50:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kd6QV-0005Mx-GW for qemu-devel@nongnu.org; Tue, 09 Sep 2008 12:50:52 -0400 Received: from [199.232.76.173] (port=51785 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kd6QV-0005Mu-BO for qemu-devel@nongnu.org; Tue, 09 Sep 2008 12:50:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]:60307) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kd6QV-0005Py-6I for qemu-devel@nongnu.org; Tue, 09 Sep 2008 12:50:51 -0400 Date: Tue, 9 Sep 2008 13:49:55 -0300 From: Glauber Costa Message-ID: <20080909164955.GD7490@poweredge.glommer> References: <1220978258-30894-1-git-send-email-dmitry.baryshkov@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220978258-30894-1-git-send-email-dmitry.baryshkov@siemens.com> Subject: [Qemu-devel] Re: [PATCH 1/2] qemu-accel: unbreak non-default accelerators Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Baryshkov Cc: qemu-devel@nongnu.org, Glauber Costa On Tue, Sep 09, 2008 at 08:37:37PM +0400, Dmitry Baryshkov wrote: > Make noaccel accelerator "registered" early so that > kqemu has a change to be enabled (it's registered > via __constructor__ feature, so called before main()). fyi: we're probably changing that. There has been a lot of mail exchange this days about the general acceptability of this feature, and the overall feeling is that it's a negative construct. So if the problem you hit happens because the constructor itself, it's probably worthy to drop it altogether, and invest time in a new method for registering the accelerators. > > Signed-off-by: Dmitry Baryshkov > Cc: Glauber Costa > --- > vl.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/vl.c b/vl.c > index 16c1e15..bf9d83c 100644 > --- a/vl.c > +++ b/vl.c > @@ -243,7 +243,6 @@ static CPUState *next_cpu; > static int event_pending = 1; > > QEMUAccel *current_accel; > -QEMUCont *head = NULL; > char qemu_app_name[20] = "QEMU"; > > void decorate_app_name(void) > @@ -290,6 +289,11 @@ QEMUAccel noaccel = { > .break_loop = accel_nop, > }; > > +QEMUCont *head = &(QEMUCont){ > + .acc = &noaccel, > + .active = 0, > +}; don't we want to register it as active = 1, for the case we're not using kqemu at all? > + > #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) > > /***********************************************************/ > @@ -7766,9 +7770,6 @@ int main(int argc, char **argv) > } > #endif > > - /* Basic handler for the noaccel case */ > - register_qemu_accel(&noaccel); > - > register_machines(); > machine = first_machine; > cpu_model = NULL; > -- > 1.5.6.5 >