mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
kvm: require KVM_CAP_IOEVENTFD and KVM_CAP_IOEVENTFD_ANY_LENGTH
KVM_CAP_IOEVENTFD_ANY_LENGTH was added in Linux 4.4, released in 2016. Assume that it is present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5d9ec1f4c7
commit
126e7f7803
9 changed files with 18 additions and 78 deletions
|
@ -264,11 +264,6 @@ struct scrub_regions {
|
|||
int fd_idx;
|
||||
};
|
||||
|
||||
static bool ioeventfd_enabled(void)
|
||||
{
|
||||
return !kvm_enabled() || kvm_eventfds_enabled();
|
||||
}
|
||||
|
||||
static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg)
|
||||
{
|
||||
struct vhost_user *u = dev->opaque;
|
||||
|
@ -1318,7 +1313,7 @@ static int vhost_set_vring_file(struct vhost_dev *dev,
|
|||
.hdr.size = sizeof(msg.payload.u64),
|
||||
};
|
||||
|
||||
if (ioeventfd_enabled() && file->fd > 0) {
|
||||
if (file->fd > 0) {
|
||||
fds[fd_num++] = file->fd;
|
||||
} else {
|
||||
msg.payload.u64 |= VHOST_USER_VRING_NOFD_MASK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue