[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/4] vl.c: Enable adding devices to the syste
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/4] vl.c: Enable adding devices to the system bus |
Date: |
Fri, 11 Apr 2014 08:45:08 +0100 |
On 11 April 2014 07:34, Alistair Francis <address@hidden> 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
- [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline, Alistair Francis, 2014/04/11
- [Qemu-devel] [PATCH v2 1/4] qemu-option.c: Add qemu_opt functions that step over arguments, Alistair Francis, 2014/04/11
- [Qemu-devel] [PATCH v2 2/4] qdev-monitor: Implement three functions used to connect devices, Alistair Francis, 2014/04/11
- [Qemu-devel] [PATCH v2 3/4] vl.c: Enable adding devices to the system bus, Alistair Francis, 2014/04/11
- Re: [Qemu-devel] [PATCH v2 3/4] vl.c: Enable adding devices to the system bus,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 4/4] qemu-options.hx: Update the command line documentation for -device, Alistair Francis, 2014/04/11
- Re: [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline, Alistair Francis, 2014/04/11
- Re: [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline, Peter Maydell, 2014/04/11