提交 fa4ba923 编写于 作者: A Amos Kong 提交者: Paolo Bonzini

kvm: add detail error message when fail to add ioeventfd

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: NAmos Kong <akong@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NGleb Natapov <gleb@redhat.com>
上级 1acd5a37
...@@ -837,6 +837,8 @@ static void kvm_mem_ioeventfd_add(MemoryListener *listener, ...@@ -837,6 +837,8 @@ static void kvm_mem_ioeventfd_add(MemoryListener *listener,
data, true, int128_get64(section->size), data, true, int128_get64(section->size),
match_data); match_data);
if (r < 0) { if (r < 0) {
fprintf(stderr, "%s: error adding ioeventfd: %s\n",
__func__, strerror(-r));
abort(); abort();
} }
} }
...@@ -869,6 +871,8 @@ static void kvm_io_ioeventfd_add(MemoryListener *listener, ...@@ -869,6 +871,8 @@ static void kvm_io_ioeventfd_add(MemoryListener *listener,
data, true, int128_get64(section->size), data, true, int128_get64(section->size),
match_data); match_data);
if (r < 0) { if (r < 0) {
fprintf(stderr, "%s: error adding ioeventfd: %s\n",
__func__, strerror(-r));
abort(); abort();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册