diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-09 23:15:32 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-05-12 14:17:52 +0200 |
commit | 7a05995361a7b4376dffb3c7f04a95644251d29f (patch) | |
tree | d83374f1546c1d1b32c4463cc05d37704664b7f8 /int128.h | |
parent | 0466e458dee22d8990aeae2b328cab6a2028e653 (diff) | |
download | qemu-7a05995361a7b4376dffb3c7f04a95644251d29f.tar.gz qemu-7a05995361a7b4376dffb3c7f04a95644251d29f.tar.bz2 qemu-7a05995361a7b4376dffb3c7f04a95644251d29f.zip |
target-i386: Defer MCE init
Commit de024815e3b523addf58f1f79846b7fe74643678 (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>
Diffstat (limited to 'int128.h')
0 files changed, 0 insertions, 0 deletions