diff options
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc_q35.c | 4 | ||||
-rw-r--r-- | hw/i386/x86.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index fa9ef449d1..59307d91e2 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -214,7 +214,7 @@ static void pc_q35_init(MachineState *machine) } /* create pci host bus */ - q35_host = Q35_HOST_DEVICE(qdev_create(NULL, TYPE_Q35_HOST_DEVICE)); + q35_host = Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); object_property_add_child(qdev_get_machine(), "q35", OBJECT(q35_host)); object_property_set_link(OBJECT(q35_host), OBJECT(ram_memory), @@ -230,7 +230,7 @@ static void pc_q35_init(MachineState *machine) object_property_set_int(OBJECT(q35_host), x86ms->above_4g_mem_size, PCI_HOST_ABOVE_4G_MEM_SIZE, NULL); /* pci */ - qdev_init_nofail(DEVICE(q35_host)); + qdev_realize_and_unref(DEVICE(q35_host), NULL, &error_fatal); phb = PCI_HOST_BRIDGE(q35_host); host_bus = phb->bus; /* create ISA bus */ diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 7a3bc7ab66..85ab52b316 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -345,13 +345,13 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name) assert(parent_name); if (kvm_ioapic_in_kernel()) { - dev = qdev_create(NULL, TYPE_KVM_IOAPIC); + dev = qdev_new(TYPE_KVM_IOAPIC); } else { - dev = qdev_create(NULL, TYPE_IOAPIC); + dev = qdev_new(TYPE_IOAPIC); } object_property_add_child(object_resolve_path(parent_name, NULL), "ioapic", OBJECT(dev)); - qdev_init_nofail(dev); + qdev_realize_and_unref(dev, NULL, &error_fatal); d = SYS_BUS_DEVICE(dev); sysbus_mmio_map(d, 0, IO_APIC_DEFAULT_ADDRESS); |