On Tue, 09 Apr 2013 13:33:56 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 05/04/2013 16:37, Igor Mammedov ha scritto: > > + const char *ioapic_name = "ioapic"; > > > > if (kvm_irqchip_in_kernel()) { > > - dev = qdev_create(NULL, "kvm-ioapic"); > > - } else { > > - dev = qdev_create(NULL, "ioapic"); > > - } > > - if (parent_name) { > > - object_property_add_child(object_resolve_path(parent_name, NULL), > > - "ioapic", OBJECT(dev), NULL); > > + ioapic_name = "kvm-ioapic"; > > } > > - qdev_init_nofail(dev); > > - d = SYS_BUS_DEVICE(dev); > > - sysbus_mmio_map(d, 0, IO_APIC_DEFAULT_ADDRESS); > > + object_property_set_str(OBJECT(dev), ioapic_name, "ioapic-type", > > NULL); > > Why do you need this? > > Having the IOAPIC as a QOM child of the icc-bridge is not too important, > I think. Perhaps not even too correct... icc-bridge provides address space for IOAPIC, so it looked like a right thing to make sure that destruction order would be IOAPIC first and only then parent icc-bridge. This patch is not really necessary for hot-plug, we could easily drop it, if you prefer. BTW: looks like this pre-reordering patch slipped in Correct one is "[PATCH 19/22] target-i386: move IOAPIC to ICC bus" > > Paolo >