[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 16/24] qdev hotplug: infrastructure and monitor
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 16/24] qdev hotplug: infrastructure and monitor commands. |
Date: |
Tue, 29 Sep 2009 14:25:43 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Gerd Hoffmann <address@hidden> writes:
[...]
>>
>> As far as I can see, all qdev_hotplug does is telling qdev_device_add()
>> and qdev_create() that this is a hotplug.
>
> Yes.
>
>> What about something like:
>>
>> DeviceState *qdev_device_add(QemuOpts *opts, int hotplug)
>> {
>> [...]
>> if (hotplug&& !bus->allow_hotplug) {
>> qemu_error("Bus %s does not support hotplugging\n",
>> bus->name);
>> return NULL;
>> }
>>
>> /* create device, set properties */
>> qdev = qdev_create(bus, driver);
>> if (hotplug) {
>> dev->hotplugged = 1;
>
> I started that way. Doesn't fly. Not every device creation goes
> through qdev_device_add(). Thus you'll have to do this in
> qdev_create(), which in turn means that you would have to add a
> hotplug parameter to tons of functions just to pass it down to
> qdev_create ...
Isn't it sufficient if every *hotplug* device creation goes through
qdev_device_add()?
- [Qemu-devel] [PATCH 15/24] switch qemu-config to qemu_error, (continued)
- [Qemu-devel] [PATCH 15/24] switch qemu-config to qemu_error, Gerd Hoffmann, 2009/09/25
- [Qemu-devel] [PATCH 21/24] drive cleanup fixes., Gerd Hoffmann, 2009/09/25
- [Qemu-devel] [PATCH 18/24] scsi: hotplug windup, Gerd Hoffmann, 2009/09/25
- [Qemu-devel] [PATCH 22/24] refactor drive_hot_add, Gerd Hoffmann, 2009/09/25
- [Qemu-devel] [PATCH 24/24] store a pointer to QemuOpts in DeviceState, release it when zapping a device., Gerd Hoffmann, 2009/09/25
- [Qemu-devel] [PATCH 16/24] qdev hotplug: infrastructure and monitor commands., Gerd Hoffmann, 2009/09/25
[Qemu-devel] [PATCH 20/24] pci: windup acpi-based hotplug, Gerd Hoffmann, 2009/09/25
Re: [Qemu-devel] [PATCH 00/24] qdev: bus management updates., Anthony Liguori, 2009/09/25
Re: [Qemu-devel] [PATCH 00/24] qdev: bus management updates., Markus Armbruster, 2009/09/28