On 11 April 2014 07:34, Alistair Francis <alistair.fran...@xilinx.com> wrote: > This removes the old method to connect devices and replaces it > with three calls to the three qdev-monitor functions added > in the previous patch. > > This allows complete machines to be built via the command line as > well as just attaching simple sysbus devices.
> static int device_init_func(QemuOpts *opts, void *opaque) > { > DeviceState *dev; > + QEMUMachineInitArgs *current_machine = (QEMUMachineInitArgs *) opaque; > + DeviceState *intc = current_machine->intc; > > - dev = qdev_device_add(opts); > - if (!dev) > - return -1; > - object_unref(OBJECT(dev)); > + dev = qdev_device_init(opts, intc); > + > + if (dev && (dev->num_gpio_in > 32)) { > + /* Store the Interupt Controller */ > + current_machine->intc = dev; > + } What is this doing here?? Interrupt controllers should not be special cases, and they're certainly not guaranteed to be the only things with 32 GPIO inputs... thanks -- PMM