Skip to content

Commit

Permalink
kvm: add detail error message when fail to add ioeventfd
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
  • Loading branch information
amoskong authored and bonzini committed Jul 3, 2013
1 parent 1acd5a3 commit fa4ba92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kvm-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit fa4ba92

Please sign in to comment.