Peter Maydell <peter.mayd...@linaro.org> writes: > On 10 September 2012 17:07, Paolo Bonzini <pbonz...@redhat.com> wrote: >> Il 10/09/2012 18:02, Anthony Liguori ha scritto: >>> IOW, shouldn't it be something more like, SerialState exports a qemu_irq >>> and then the machine code decides whether to route that irq to a call to >>> qemu_system_wakeup(). Then depending on whether this is coming from >>> serial[1], determines which reason is used. >> >> But the only way to do it, that works for -device, is to look at the >> SerialState's iobase. > > This just says that -device is broken (which we kinda already knew > :-))
There are opposing forces here. libvirt wants to use -device because we don't provide a way for machine creates devices to be configurable. We can't fix this until we separate realization from initialization. After that point, libvirt could address properties on machine-created devices directly. I think the best short term solution is to have a post '-device' handler in machines that could be used to make the appropriate connections. Power et al. need this anyway for dealing with device tree creation so it seems to be inevitable. Regards, Anthony Liguori > > -- PMM