On 09/20/2018 03:32 PM, Fam Zheng wrote:
On Wed, 09/19 23:51, Fam Zheng wrote:
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index d7a4bbd91f..e7cbb0c368 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -165,7 +165,8 @@ static void start_comp_thread(RdmaBackendDev *backend_dev)
ibv_get_device_name(backend_dev->ib_dev));
backend_dev->comp_thread.run = true;
qemu_thread_create(&backend_dev->comp_thread.thread, thread_name,
- comp_handler_thread, backend_dev, QEMU_THREAD_DETACHED);
+ comp_handler_thread, backend_dev,
+ QEMU_THREAD_DETACHED, &error_abort);
Previously we don't abort() QEMU if a new thread cannot be created. I think we
want some more robustness here. Peter?
Looking more closely, this is not migration code, but device code. So it doesn't
hurt as much, but still, in the longer term we may want to handle the error
instead of abort(). E.g. in activate_device() set an error state. A task for a
separate series, though. So this patch can be kept as is, or add a FIXME
comment.
Fam
Yes, this is a device code. But as I am not familiar with the rdma stuff
and adding
error handling in activate_device() may involve the interrupt handling,
I'd prefer to
add a FIXME comment. :)
Have a nice day, thanks again
Fei