From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuIg7-0000EA-Vw for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:44:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuIg6-0007VR-Vb for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:44:43 -0400 Received: from mail-bk0-x22f.google.com ([2a00:1450:4008:c01::22f]:36626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuIg6-0007VJ-On for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:44:42 -0400 Received: by mail-bk0-f47.google.com with SMTP id jg1so2731333bkc.20 for ; Wed, 03 Jul 2013 01:44:41 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 3 Jul 2013 10:44:28 +0200 Message-Id: <1372841072-22265-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372841072-22265-1-git-send-email-pbonzini@redhat.com> References: <1372841072-22265-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/5] kvm: add detail error message when fail to add ioeventfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Amos Kong , gleb@redhat.com From: Amos Kong I try to hotplug 28 * 8 multiple-function devices to guest with old host kernel, ioeventfds in host kernel will be exhausted, then qemu fails to allocate ioeventfds for blk/nic devices. It's better to add detail error here. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi Signed-off-by: Gleb Natapov --- kvm-all.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kvm-all.c b/kvm-all.c index c757dd2..12042f7 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -837,6 +837,8 @@ static void kvm_mem_ioeventfd_add(MemoryListener *listener, data, true, int128_get64(section->size), match_data); if (r < 0) { + fprintf(stderr, "%s: error adding ioeventfd: %s\n", + __func__, strerror(-r)); abort(); } } @@ -869,6 +871,8 @@ static void kvm_io_ioeventfd_add(MemoryListener *listener, data, true, int128_get64(section->size), match_data); if (r < 0) { + fprintf(stderr, "%s: error adding ioeventfd: %s\n", + __func__, strerror(-r)); abort(); } } -- 1.8.1.4