On Mon, 14 Apr 2014 13:25:59 -0400 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 11/04/2014 05:14, Igor Mammedov ha scritto: > >>>> > > > How about simply looking for a hotplug handler type device instead? > >>>> > > > We aren't likely to have many of these, are we? > >>> > > > >>> > > How about adding link<acpi_device> to PCMachine when it's created > >>> > > and use it instead of piix4_pm_find()/ich9_lpc_find() everywhere? > >>> > > that would allow to remove above searches in QOM tree and simplify > >>> > > code including acpi-build.c > >> > > >> > So each acpi implementation registers a link at a pre-defined path? > > That's a nice solution. (It would be a link<HotplugHandler>, right?) Yep, but still named acpi_dev :), so that each board piix4/q35 could setup it's own device in board init code and generic code just use what board has provided. > > Paolo > > > >> > I'm fine with this, need an ack from afaerber though. > > It could be a just plain pointer since it points to system device which > > won't disappear suddenly (i.e. it's not hot-unplugable). > > > -- Regards, Igor