target-i386: cpu: Do not ignore error and fix apic parent
authorIgor Mammedov <imammedo@redhat.com>
Wed, 6 Jul 2016 06:20:52 +0000 (08:20 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 20 Jul 2016 15:02:18 +0000 (12:02 -0300)
commit6816b1b3811e839540df22855d975b6d76ae438b
tree2e1584ded54bdcdbc28bc53d2030ecff61762a68
parentc2f193b538032accb9db504998bf2ea7c0ef65af
target-i386: cpu: Do not ignore error and fix apic parent

object_property_add_child() silently fails with error that it can't
create duplicate propery 'apic' as we already have 'apic' property
registered for 'apic' feature. As result generic device_realize puts
apic into unattached container.

As it's programming error, abort if name collision happens in future
and fix property name for apic_state to 'lapic', this way apic is
a child of cpu instance.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target-i386/cpu.c