[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 13/36] qdev: do not allow to instantiate non
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 13/36] qdev: do not allow to instantiate non hotpluggable device with device_add |
Date: |
Mon, 29 Sep 2014 12:58:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 |
Il 26/09/2014 11:28, Igor Mammedov ha scritto:
> It will allow explicitly mark device as not hotpluggable and
> avoid its creation with following error at realize time
> and destroying it afterwards anyway. Instead of it will
> error out even before instance of device is created.
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> qdev-monitor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qdev-monitor.c b/qdev-monitor.c
> index f6db461..c721451 100644
> --- a/qdev-monitor.c
> +++ b/qdev-monitor.c
> @@ -487,7 +487,8 @@ DeviceState *qdev_device_add(QemuOpts *opts)
> }
>
> dc = DEVICE_CLASS(oc);
> - if (dc->cannot_instantiate_with_device_add_yet) {
> + if (dc->cannot_instantiate_with_device_add_yet ||
> + (qdev_hotplug && !dc->hotpluggable)) {
> qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
> "pluggable device type");
> return NULL;
>
Reviewed-by: Paolo Bonzini <address@hidden>
- [Qemu-devel] [PATCH v2 03/36] test: libqos: add qpci_plug_device_test() and qpci_unplug_acpi_device_test(), (continued)
- [Qemu-devel] [PATCH v2 03/36] test: libqos: add qpci_plug_device_test() and qpci_unplug_acpi_device_test(), Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 04/36] test: virtio-rng: check if hot-plug/unplug works, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 05/36] test: virtio-net: check if hot-plug/unplug works, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 06/36] test: virtio-blk: check if hot-plug/unplug works, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 07/36] test: usb: move uhci port test code to libqos/usb.c, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 08/36] test: usb: add port test to uhci unit test, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 09/36] test: usb: generic usb device hotplug, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 10/36] test: usb: usb-storage hotplug test, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 12/36] access BusState.allow_hotplug using wraper qbus_is_hotpluggable(), Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 13/36] qdev: do not allow to instantiate non hotpluggable device with device_add, Igor Mammedov, 2014/09/26
- Re: [Qemu-devel] [PATCH v2 13/36] qdev: do not allow to instantiate non hotpluggable device with device_add,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v2 14/36] qdev: HotplugHandler: rename unplug callback to unplug_request, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 15/36] qdev: HotplugHandler: provide unplug callback, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 16/36] qdev: add simple/generic unplug callback for HotplugHandler, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 18/36] qdev: drop hotplug check from bus_add_child(), Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 17/36] qdev: add wrapper to set BUS as HotplugHandler, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 20/36] virtio-pci: drop BusState.allow_hotplug, Igor Mammedov, 2014/09/26
- [Qemu-devel] [PATCH v2 21/36] virtio-serial: convert to hotplug-handler API, Igor Mammedov, 2014/09/26