qemu-devel
[Top][All Lists]
Advanced

[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()?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]