• Andreas Färber's avatar
    target-i386: Defer MCE init · 7a059953
    Andreas Färber authored
    Commit de024815 (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: default avatarIgor Mammedov <imammedo@redhat.com>
    Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
    7a059953
Name
Last commit
Last update
QMP Loading commit data...
audio Loading commit data...
block Loading commit data...
bsd-user Loading commit data...
default-configs Loading commit data...
docs Loading commit data...
fpu Loading commit data...
fsdev Loading commit data...
gdb-xml Loading commit data...
hw Loading commit data...
include/qemu Loading commit data...
libcacard Loading commit data...
linux-headers Loading commit data...
linux-user Loading commit data...
net Loading commit data...
pc-bios Loading commit data...
qapi Loading commit data...
qga Loading commit data...
qom Loading commit data...
roms Loading commit data...
scripts Loading commit data...
slirp Loading commit data...
sysconfigs/target Loading commit data...
target-alpha Loading commit data...
target-arm Loading commit data...
target-cris Loading commit data...
target-i386 Loading commit data...
target-lm32 Loading commit data...
target-m68k Loading commit data...
target-microblaze Loading commit data...
target-mips Loading commit data...
target-ppc Loading commit data...
target-s390x Loading commit data...
target-sh4 Loading commit data...
target-sparc Loading commit data...
target-unicore32 Loading commit data...
target-xtensa Loading commit data...
tcg Loading commit data...
tests Loading commit data...
trace Loading commit data...
ui Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
CODING_STYLE Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Changelog Loading commit data...
HACKING Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
Makefile.dis Loading commit data...
Makefile.hw Loading commit data...
Makefile.objs Loading commit data...
Makefile.target Loading commit data...
Makefile.user Loading commit data...
README Loading commit data...
TODO Loading commit data...
VERSION Loading commit data...
a.out.h Loading commit data...
acl.c Loading commit data...
acl.h Loading commit data...
aes.c Loading commit data...
aes.h Loading commit data...
aio.c Loading commit data...
alpha-dis.c Loading commit data...
alpha.ld Loading commit data...
arch_init.c Loading commit data...
arch_init.h Loading commit data...
arm-dis.c Loading commit data...
arm-semi.c Loading commit data...
arm.ld Loading commit data...
async.c Loading commit data...
balloon.c Loading commit data...
balloon.h Loading commit data...
bitmap.c Loading commit data...
bitmap.h Loading commit data...
bitops.c Loading commit data...
bitops.h Loading commit data...
block-migration.c Loading commit data...
block-migration.h Loading commit data...
block.c Loading commit data...
block.h Loading commit data...
block_int.h Loading commit data...
blockdev.c Loading commit data...
blockdev.h Loading commit data...
bswap.h Loading commit data...
bt-host.c Loading commit data...
bt-host.h Loading commit data...
bt-vhci.c Loading commit data...
buffered_file.c Loading commit data...
buffered_file.h Loading commit data...
cache-utils.c Loading commit data...
cache-utils.h Loading commit data...
cmd.c Loading commit data...
cmd.h Loading commit data...
compatfd.c Loading commit data...
compatfd.h Loading commit data...
compiler.h Loading commit data...
config.h Loading commit data...
configure Loading commit data...
console.c Loading commit data...
console.h Loading commit data...
coroutine-gthread.c Loading commit data...
coroutine-sigaltstack.c Loading commit data...
coroutine-ucontext.c Loading commit data...
coroutine-win32.c Loading commit data...
cpu-all.h Loading commit data...
cpu-common.h Loading commit data...
cpu-defs.h Loading commit data...
cpu-exec.c Loading commit data...
cpus.c Loading commit data...
cpus.h Loading commit data...
cputlb.c Loading commit data...
cputlb.h Loading commit data...
cris-dis.c Loading commit data...
cursor.c Loading commit data...
cursor_hidden.xpm Loading commit data...
cursor_left_ptr.xpm Loading commit data...
cutils.c Loading commit data...
def-helper.h Loading commit data...
device_tree.c Loading commit data...
device_tree.h Loading commit data...
dis-asm.h Loading commit data...
disas.c Loading commit data...
disas.h Loading commit data...
dma-helpers.c Loading commit data...
dma.h Loading commit data...
dyngen-exec.h Loading commit data...
elf.h Loading commit data...
envlist.c Loading commit data...
envlist.h Loading commit data...
error.c Loading commit data...
error.h Loading commit data...
error_int.h Loading commit data...
event_notifier.c Loading commit data...
event_notifier.h Loading commit data...
exec-all.h Loading commit data...
exec-memory.h Loading commit data...
exec-obsolete.h Loading commit data...
exec.c Loading commit data...
gdbstub.c Loading commit data...
gdbstub.h Loading commit data...
gen-icount.h Loading commit data...
hmp-commands.hx Loading commit data...
hmp.c Loading commit data...
hmp.h Loading commit data...
host-utils.c Loading commit data...
host-utils.h Loading commit data...
hppa-dis.c Loading commit data...
hppa.ld Loading commit data...
i386-dis.c Loading commit data...
i386.ld Loading commit data...
ia64-dis.c Loading commit data...
ia64.ld Loading commit data...
input.c Loading commit data...
int128.h Loading commit data...
iohandler.c Loading commit data...
ioport-user.c Loading commit data...
ioport.c Loading commit data...
ioport.h Loading commit data...
iorange.h Loading commit data...
iov.c Loading commit data...
iov.h Loading commit data...
json-lexer.c Loading commit data...
json-lexer.h Loading commit data...
json-parser.c Loading commit data...
json-parser.h Loading commit data...
json-streamer.c Loading commit data...
json-streamer.h Loading commit data...
kvm-all.c Loading commit data...
kvm-stub.c Loading commit data...
kvm.h Loading commit data...
libfdt_env.h Loading commit data...
linux-aio.c Loading commit data...
lm32-dis.c Loading commit data...
m68k-dis.c Loading commit data...
m68k-semi.c Loading commit data...
m68k.ld Loading commit data...
main-loop.c Loading commit data...
main-loop.h Loading commit data...
memory.c Loading commit data...
memory.h Loading commit data...
microblaze-dis.c Loading commit data...
migration-exec.c Loading commit data...
migration-fd.c Loading commit data...
migration-tcp.c Loading commit data...
migration-unix.c Loading commit data...
migration.c Loading commit data...
migration.h Loading commit data...
mips-dis.c Loading commit data...
mips.ld Loading commit data...
module.c Loading commit data...
module.h Loading commit data...
monitor.c Loading commit data...
monitor.h Loading commit data...
nbd.c Loading commit data...
nbd.h Loading commit data...
net.c Loading commit data...
net.h Loading commit data...
notify.c Loading commit data...
notify.h Loading commit data...
os-posix.c Loading commit data...
os-win32.c Loading commit data...
osdep.c Loading commit data...
osdep.h Loading commit data...
oslib-posix.c Loading commit data...
oslib-win32.c Loading commit data...
path.c Loading commit data...
pci-ids.txt Loading commit data...
pflib.c Loading commit data...
pflib.h Loading commit data...
poison.h Loading commit data...
posix-aio-compat.c Loading commit data...
ppc-dis.c Loading commit data...
ppc.ld Loading commit data...
ppc64.ld Loading commit data...
qapi-schema-guest.json Loading commit data...
qapi-schema-test.json Loading commit data...
qapi-schema.json Loading commit data...
qbool.c Loading commit data...
qbool.h Loading commit data...
qdict-test-data.txt Loading commit data...
qdict.c Loading commit data...
qdict.h Loading commit data...
qemu-aio.h Loading commit data...
qemu-barrier.h Loading commit data...
qemu-bridge-helper.c Loading commit data...
qemu-char.c Loading commit data...
qemu-char.h Loading commit data...
qemu-common.h Loading commit data...
qemu-config.c Loading commit data...
qemu-config.h Loading commit data...
qemu-coroutine-int.h Loading commit data...
qemu-coroutine-io.c Loading commit data...
qemu-coroutine-lock.c Loading commit data...
qemu-coroutine-sleep.c Loading commit data...
qemu-coroutine.c Loading commit data...
qemu-coroutine.h Loading commit data...
qemu-doc.texi Loading commit data...
qemu-error.c Loading commit data...
qemu-error.h Loading commit data...
qemu-file.h Loading commit data...
qemu-ga.c Loading commit data...
qemu-img-cmds.hx Loading commit data...
qemu-img.c Loading commit data...
qemu-img.texi Loading commit data...
qemu-io.c Loading commit data...
qemu-lock.h Loading commit data...
qemu-log.h Loading commit data...
qemu-nbd.c Loading commit data...
qemu-nbd.texi Loading commit data...
qemu-objects.h Loading commit data...
qemu-option.c Loading commit data...
qemu-option.h Loading commit data...
qemu-options-wrapper.h Loading commit data...
qemu-options.h Loading commit data...
qemu-options.hx Loading commit data...
qemu-os-posix.h Loading commit data...
qemu-os-win32.h Loading commit data...
qemu-progress.c Loading commit data...
qemu-queue.h Loading commit data...
qemu-sockets.c Loading commit data...
qemu-tech.texi Loading commit data...
qemu-thread-posix.c Loading commit data...
qemu-thread-posix.h Loading commit data...
qemu-thread-win32.c Loading commit data...
qemu-thread-win32.h Loading commit data...
qemu-thread.h Loading commit data...
qemu-timer-common.c Loading commit data...
qemu-timer.c Loading commit data...
qemu-timer.h Loading commit data...
qemu-tls.h Loading commit data...
qemu-tool.c Loading commit data...
qemu-user.c Loading commit data...
qemu-x509.h Loading commit data...
qemu-xattr.h Loading commit data...
qemu.sasl Loading commit data...
qemu_socket.h Loading commit data...
qerror.c Loading commit data...
qerror.h Loading commit data...
qfloat.c Loading commit data...
qfloat.h Loading commit data...
qint.c Loading commit data...
qint.h Loading commit data...
qjson.c Loading commit data...
qjson.h Loading commit data...
qlist.c Loading commit data...
qlist.h Loading commit data...
qmp-commands.hx Loading commit data...
qmp.c Loading commit data...
qobject.h Loading commit data...
qstring.c Loading commit data...
qstring.h Loading commit data...
qtest.c Loading commit data...
qtest.h Loading commit data...
range.h Loading commit data...
readline.c Loading commit data...
readline.h Loading commit data...
rules.mak Loading commit data...
s390-dis.c Loading commit data...
s390.ld Loading commit data...
savevm.c Loading commit data...
sh4-dis.c Loading commit data...
softmmu-semi.h Loading commit data...
softmmu_defs.h Loading commit data...
softmmu_exec.h Loading commit data...
softmmu_header.h Loading commit data...
softmmu_template.h Loading commit data...
sparc-dis.c Loading commit data...
sparc.ld Loading commit data...
sparc64.ld Loading commit data...
spice-qemu-char.c Loading commit data...
sysemu.h Loading commit data...
targphys.h Loading commit data...
tcg-runtime.c Loading commit data...
tci-dis.c Loading commit data...
tci.c Loading commit data...
thunk.c Loading commit data...
thunk.h Loading commit data...
trace-events Loading commit data...
translate-all.c Loading commit data...
uboot_image.h Loading commit data...
user-exec.c Loading commit data...
version.rc Loading commit data...
vgafont.h Loading commit data...
vl.c Loading commit data...
vmstate.h Loading commit data...
x86_64.ld Loading commit data...
xen-all.c Loading commit data...
xen-mapcache.c Loading commit data...
xen-mapcache.h Loading commit data...
xen-stub.c Loading commit data...
xtensa-semi.c Loading commit data...