提交 b0aa77d3 编写于 作者: L Li Qiang 提交者: Michael S. Tsirkin

vhost-user: fix ioeventfd_enabled

Currently, the vhost-user-test assumes the eventfd is available.
However it's not true because the accel is qtest. So the
'vhost_set_vring_file' will not add fds to the msg and the server
side of vhost-user-test will be broken. The bug is in 'ioeventfd_enabled'.
We should make this function return true if not using kvm accel.
Signed-off-by: NLi Qiang <liq3ea@163.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 82248cd4
......@@ -207,7 +207,7 @@ struct vhost_user {
static bool ioeventfd_enabled(void)
{
return kvm_enabled() && kvm_eventfds_enabled();
return !kvm_enabled() || kvm_eventfds_enabled();
}
static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册