From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjR3a-0006FM-7F for qemu-devel@nongnu.org; Mon, 03 Jun 2013 05:28:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjR3Y-00018P-48 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 05:28:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjR3X-00017H-T2 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 05:28:00 -0400 Date: Mon, 3 Jun 2013 12:27:57 +0300 From: Gleb Natapov Message-ID: <20130603092757.GE4725@redhat.com> References: <1369198655-25156-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369198655-25156-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] kvm: add detail error message when fail to add ioeventfd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote: > 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. > Applied, thanks. > Signed-off-by: Amos Kong > --- > kvm-all.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/kvm-all.c b/kvm-all.c > index 8222729..3d5f7b7 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -813,6 +813,8 @@ static void kvm_mem_ioeventfd_add(MemoryListener *listener, > r = kvm_set_ioeventfd_mmio(fd, section->offset_within_address_space, > data, true, section->size, match_data); > if (r < 0) { > + fprintf(stderr, "%s: error adding ioeventfd: %s\n", > + __func__, strerror(-r)); > abort(); > } > } > @@ -843,6 +845,8 @@ static void kvm_io_ioeventfd_add(MemoryListener *listener, > r = kvm_set_ioeventfd_pio(fd, section->offset_within_address_space, > data, true, section->size, match_data); > if (r < 0) { > + fprintf(stderr, "%s: error adding ioeventfd: %s\n", > + __func__, strerror(-r)); > abort(); > } > } > -- > 1.7.1 -- Gleb.