| Submitter | Jan Kiszka |
|---|---|
| Date | Feb. 2, 2010, 8:19 a.m. |
| Message ID | <2d0fdfb0437e9075c818c4b6f21a702d77b9550b.1265098708.git.jan.kiszka@siemens.com> |
| Download | mbox | patch |
| Permalink | /patch/44262/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/hw/pc.c b/hw/pc.c index 3df6195..cd0746c 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -751,11 +751,6 @@ CPUState *pc_new_cpu(const char *cpu_model) } else { qemu_register_reset((QEMUResetHandler*)cpu_reset, env); } - - /* kvm needs this to run after the apic is initialized. Otherwise, - * it can access invalid state and crash. - */ - qemu_init_vcpu(env); return env; } diff --git a/target-i386/helper.c b/target-i386/helper.c index f9d63f6..f83e8cc 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1953,6 +1953,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model) } mce_init(env); + qemu_init_vcpu(env); + return env; }
There is no need for the this hack anymore, initialization is now robust against reordering as it doesn't try to write the VCPU state on its own. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- hw/pc.c | 5 ----- target-i386/helper.c | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-)