For hotplug it's important not to crash guest if hotplug is not possible. This series make 'device_add FOO,...' fail safely if there isn't enough memory for FOO device instance.
Igor Mammedov (2): qom: add object_class_get_instance_size() qdev: safely fail device_add if unable to allocate device include/qom/object.h | 8 ++++++++ qdev-monitor.c | 9 ++++++++- qom/object.c | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) -- 1.8.3.1