[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/2] qemu-accel: unbreak non-default accelerator
From: |
Glauber Costa |
Subject: |
[Qemu-devel] Re: [PATCH 1/2] qemu-accel: unbreak non-default accelerators |
Date: |
Tue, 9 Sep 2008 13:49:55 -0300 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
> Cc: Glauber Costa <address@hidden>
> ---
> 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
>