From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9wzi-0004Bd-0e for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:30:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9wze-0001jr-1U for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:30:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9wzd-0001jX-Si for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:30:53 -0500 From: Igor Mammedov Date: Fri, 18 Dec 2015 16:30:45 +0100 Message-Id: <1450452647-118105-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] qdev: fail safely if can't allocate device in device_add() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, afaerber@suse.de, armbru@redhat.com 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