qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@siemens.com>
To: qemu-devel@nongnu.org
Cc: Glauber Costa <gcosta@redhat.com>,
	Dmitry Baryshkov <dmitry.baryshkov@siemens.com>
Subject: [Qemu-devel] [PATCH 1/2] qemu-accel: unbreak non-default accelerators
Date: Tue,  9 Sep 2008 20:37:37 +0400	[thread overview]
Message-ID: <1220978258-30894-1-git-send-email-dmitry.baryshkov@siemens.com> (raw)

Make noaccel accelerator "registered" early so that
kqemu has a change to be enabled (it's registered
via __constructor__ feature, so called before main()).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@siemens.com>
Cc: Glauber Costa <gcosta@redhat.com>
---
 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,
+};
+
 #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

             reply	other threads:[~2008-09-09 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 16:37 Dmitry Baryshkov [this message]
2008-09-09 16:37 ` [Qemu-devel] [PATCH 2/2] qemu-accel: unbreak kqemu Dmitry Baryshkov
2008-09-09 16:49 ` [Qemu-devel] Re: [PATCH 1/2] qemu-accel: unbreak non-default accelerators Glauber Costa
2008-09-10  7:21   ` Jan Kiszka
2008-09-10 13:48     ` Glauber Costa
2008-09-10 14:15       ` Jan Kiszka

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=1220978258-30894-1-git-send-email-dmitry.baryshkov@siemens.com \
    --to=dmitry.baryshkov@siemens.com \
    --cc=gcosta@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).