mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-12 21:45:40 +00:00
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. Backports commit 6816b1b3811e839540df22855d975b6d76ae438b from qemu
This commit is contained in:
parent
403021183d
commit
e15fb246ab
|
@ -2907,8 +2907,8 @@ static void x86_cpu_apic_create(X86CPU *cpu, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
object_property_add_child(OBJECT(cpu), "apic",
|
||||
OBJECT(cpu->apic_state), NULL);
|
||||
object_property_add_child(OBJECT(cpu), "lapic",
|
||||
OBJECT(cpu->apic_state), &error_abort);
|
||||
//qdev_prop_set_uint8(cpu->apic_state, "id", cpu->apic_id);
|
||||
/* TODO: convert to link<> */
|
||||
apic = APIC_COMMON(cpu->apic_state);
|
||||
|
|
Loading…
Reference in a new issue