All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: add detail error message when fail to add ioeventfd
@ 2013-05-22  4:57 ` Amos Kong
  0 siblings, 0 replies; 12+ messages in thread
From: Amos Kong @ 2013-05-22  4:57 UTC (permalink / raw)
  To: gleb; +Cc: kvm, qemu-devel

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 <akong@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-06-03  9:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22  4:57 [PATCH] kvm: add detail error message when fail to add ioeventfd Amos Kong
2013-05-22  4:57 ` [Qemu-devel] " Amos Kong
2013-05-22  9:32 ` Stefan Hajnoczi
2013-05-22  9:32   ` [Qemu-devel] " Stefan Hajnoczi
2013-05-22 13:48   ` Amos Kong
2013-05-22 13:48     ` [Qemu-devel] " Amos Kong
2013-05-23  7:46     ` Stefan Hajnoczi
2013-05-23  7:46       ` [Qemu-devel] " Stefan Hajnoczi
2013-05-24  9:16       ` Amos Kong
2013-05-24  9:16         ` [Qemu-devel] " Amos Kong
2013-06-03  9:27 ` Gleb Natapov
2013-06-03  9:27   ` [Qemu-devel] " Gleb Natapov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.