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

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 <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,
> +};
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
> 

  parent reply	other threads:[~2008-09-09 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 16:37 [Qemu-devel] [PATCH 1/2] qemu-accel: unbreak non-default accelerators Dmitry Baryshkov
2008-09-09 16:37 ` [Qemu-devel] [PATCH 2/2] qemu-accel: unbreak kqemu Dmitry Baryshkov
2008-09-09 16:49 ` Glauber Costa [this message]
2008-09-10  7:21   ` [Qemu-devel] Re: [PATCH 1/2] qemu-accel: unbreak non-default accelerators 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=20080909164955.GD7490@poweredge.glommer \
    --to=glommer@redhat.com \
    --cc=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).