Skip to content

Commit

Permalink
vhost-user: fix ioeventfd_enabled
Browse files Browse the repository at this point in the history
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: Li Qiang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
terenceli authored and lacraig2 committed Nov 20, 2023
1 parent c7554f0 commit 1165bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/virtio/vhost-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,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)
Expand Down

0 comments on commit 1165bcc

Please sign in to comment.