qemu-patch-raspberry4/target-i386
Andreas Färber 7a05995361 target-i386: Defer MCE init
Commit de024815e3 (target-i386: QOM'ify
CPU init) moved mce_init() call from helper.c:cpu_x86_init() into
X86CPU's cpu.c:x86_cpu_initfn().
mce_init() checks for a family >= 6 though, so we could end up with a
sequence such as for -cpu somecpu,family=6:

  x86_cpu_initfn => X86CPU::family == 5
    mce_init => no-op
  cpu_x86_register => X86CPU::family = 6
  => MCE unexpectedly not init'ed

or for -cpu someothercpu,family=5:

  x86_cpu_initfn => X86CPU::family == 6
    mce_init => init'ed
  cpu_x86_register => X86CPU::family = 5
  => MCE unexpectedly init'ed

Therefore partially revert the above commit. To avoid moving
mce_init() back into helper.c, foresightedly move it into a
new x86_cpu_realize() function and, in lack of ObjectClass::realize,
call it directly from cpu_x86_init().

While at it, move the qemu_init_vcpu() call that used to follow
mce_init() in cpu_x86_init() into the new realizefn as well.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2012-05-12 14:17:52 +02:00
..
cpu-qom.h target-i386: Defer MCE init 2012-05-12 14:17:52 +02:00
cpu.c target-i386: Defer MCE init 2012-05-12 14:17:52 +02:00
cpu.h target-i386: Pass X86CPU to cpu_x86_register() 2012-04-25 10:51:35 +02:00
helper.c target-i386: Defer MCE init 2012-05-12 14:17:52 +02:00
helper.h target-i386: fix SSE rounding and flush to zero 2012-01-11 09:55:28 +01:00
helper_template.h Update to a hopefully more future proof FSF address 2009-07-16 20:47:01 +00:00
hyperv.c hyper-v: introduce Hyper-V support infrastructure. 2012-01-19 08:32:12 -02:00
hyperv.h hyperv: fix build on non-KVM hosts 2012-01-23 20:04:51 +00:00
kvm.c target-i386: Don't overuse CPUState 2012-03-14 22:20:25 +01:00
machine.c target-i386: Don't overuse CPUState 2012-03-14 22:20:25 +01:00
op_helper.c Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
ops_sse.h target-i386: fix dpps and dppd SSE2 instructions 2012-01-11 09:55:28 +01:00
ops_sse_header.h tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts. 2010-06-16 11:29:11 +02:00
svm.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
TODO target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions 2012-01-11 09:55:28 +01:00
translate.c target-i386: Don't overuse CPUState 2012-03-14 22:20:25 +01:00