There is no much sence in holding back rather independed cpu_reset and tcg init patches from: "[PATCH qom-next v3 0/12] target-i386: re-factor CPU creation/initialization to QOM" http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg04077.html
Reposting ammended and rebased patches. git tree for testing: https://github.com/imammedo/qemu/tree/x86cpu_qom_reset_tcg Compile & Run tested: target-i386: tcg and kvm mode i386-linux-user: running of /bin/ls Igor Mammedov (5): target-i386: move reset callback to cpu.c and call cpu_reset() in x86_cpu_realize() target-i386: move cpu halted decision into x86_cpu_reset target-i386: call x86_cpu_realize() only after APIC is initialized. target-i386: move tcg initialization into x86_cpu_initfn() target-i386: drop usage of prev_debug_excp_handler hw/apic.h | 2 +- hw/apic_common.c | 20 ++++++++++++++------ hw/pc.c | 10 +--------- target-i386/cpu.c | 19 +++++++++++++++++++ target-i386/cpu.h | 1 + target-i386/helper.c | 19 +------------------ target-i386/kvm.c | 5 +++-- 7 files changed, 40 insertions(+), 36 deletions(-)