diff --git a/qdev-monitor.c b/qdev-monitor.c index f2a5a6fc564f39ca0ddd6de6ee59e95ccbbd6fcc..7877d018781fd07209a5c24939c71f8d5c1b489c 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -490,6 +490,11 @@ DeviceState *qdev_device_add(QemuOpts *opts) } dc = DEVICE_CLASS(oc); + if (dc->cannot_instantiate_with_device_add_yet) { + qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", + "pluggable device type"); + return NULL; + } /* find bus */ path = qemu_opt_get(opts, "bus");