[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/13] [PATCH] split kqemu_init into two
From: |
Glauber Costa |
Subject: |
[Qemu-devel] [PATCH 02/13] [PATCH] split kqemu_init into two |
Date: |
Thu, 15 May 2008 11:09:22 -0300 |
we separate kqemu_init() into a part that depends on env,
and other that does not. The later can be initialized earlier
---
exec.c | 3 +++
kqemu.c | 10 +++++++---
target-i386/helper2.c | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index 5384460..dfedfc3 100644
--- a/exec.c
+++ b/exec.c
@@ -334,6 +334,9 @@ void exec_init(void)
code_gen_ptr = code_gen_buffer;
page_init();
io_mem_init();
+#ifdef USE_KQEMU
+ kqemu_start();
+#endif
}
void cpu_exec_init(CPUState *env)
diff --git a/kqemu.c b/kqemu.c
index 88592ee..0e38d52 100644
--- a/kqemu.c
+++ b/kqemu.c
@@ -159,7 +159,7 @@ static void kqemu_update_cpuid(CPUState *env)
accelerated code */
}
-int kqemu_init(CPUState *env)
+int kqemu_start(void)
{
struct kqemu_init init;
int ret, version;
@@ -238,13 +238,17 @@ int kqemu_init(CPUState *env)
kqemu_fd = KQEMU_INVALID_FD;
return -1;
}
- kqemu_update_cpuid(env);
- env->kqemu_enabled = kqemu_allowed;
nb_pages_to_flush = 0;
nb_ram_pages_to_update = 0;
return 0;
}
+void kqemu_init_env(CPUState *env)
+{
+ kqemu_update_cpuid(env);
+ env->kqemu_enabled = kqemu_allowed;
+}
+
void kqemu_flush_page(CPUState *env, target_ulong addr)
{
#if defined(DEBUG)
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index 6cf218f..1c0fcdb 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -113,7 +113,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
}
cpu_reset(env);
#ifdef USE_KQEMU
- kqemu_init(env);
+ kqemu_init_env(env);
#endif
return env;
}
--
1.5.5
- [Qemu-devel] [PATCH 0/13] New shot at QEMUAccel, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 01/13] [PATCH] make cpu_exec_init symmetric, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 02/13] [PATCH] split kqemu_init into two,
Glauber Costa <=
- [Qemu-devel] [PATCH 03/13] [PATCH] introduce QEMUAccel and fill it with interrupt specific driver, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 04/13] [PATCH] init env made accel driver, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 05/13] [PATCH] wrap cache flushing functions into accel drivers, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 06/13] [PATCH] turn info kqemu into generic info accelerator, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 07/13] [PATCH] separate accelerator part of info profiler, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 08/13] [PATCH] move kqemu externs to kqemu.h, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 09/13] [PATCH] move disabling code to kqemu.c instead of vl.c, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 10/13] [PATCH] set_notdirty goes through accel wrapper, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 11/13] [PATCH] wrap modify_page through accel calls, Glauber Costa, 2008/05/15
- [Qemu-devel] [PATCH 12/13] [PATCH] remove kqemu reference from hw/pc.c, Glauber Costa, 2008/05/15