6e8e265199
x86_cpu_apic_realize() calls qdev_init() to realize the APIC. qdev_init()'s error handling has unwanted side effects: it unparents the device, and it calls qerror_report_err(). qerror_report_err() is always inappropriate in realize methods, because it doesn't return the Error object. It either reports the error to stderr or the human monitor, or it stores it in the QMP monitor, where it makes the QMP command fail even though the realize method succeeded. Fortunately, qdev_init() can't actually fail here, because realize can't fail for any of the three possible APIC device models. Clean up by cutting out the qdev_init() middle-man: set property "realized" directly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> |
||
---|---|---|
.. | ||
arch_dump.c | ||
arch_memory_mapping.c | ||
cc_helper_template.h | ||
cc_helper.c | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
excp_helper.c | ||
fpu_helper.c | ||
gdbstub.c | ||
helper.c | ||
helper.h | ||
int_helper.c | ||
ioport-user.c | ||
kvm_i386.h | ||
kvm-stub.c | ||
kvm.c | ||
machine.c | ||
Makefile.objs | ||
mem_helper.c | ||
misc_helper.c | ||
ops_sse_header.h | ||
ops_sse.h | ||
seg_helper.c | ||
shift_helper_template.h | ||
smm_helper.c | ||
svm_helper.c | ||
svm.h | ||
TODO | ||
topology.h | ||
translate.c |