[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/25] vhost-user: fix ioeventfd_enabled
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 03/25] vhost-user: fix ioeventfd_enabled |
Date: |
Mon, 14 Jan 2019 11:01:58 +0100 |
From: Li Qiang <address@hidden>
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 <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
hw/virtio/vhost-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index e09bed0..564a31d 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -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)
--
1.8.3.1
- [Qemu-devel] [PULL 00/25] ivshmem deprecation, qtests, typedefs and gnu99, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 02/25] tests: vhost-user-test: initialize 'fd' in chr_read, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 04/25] util: check the return value of fcntl in qemu_set_{block, nonblock}, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 03/25] vhost-user: fix ioeventfd_enabled,
Thomas Huth <=
- [Qemu-devel] [PULL 05/25] tests/Makefile: Use some more CONFIG switches for x86 tests, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 14/25] hw/i2c/smbus: Remove SMBusDevice from "qemu/typedefs.h", Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 08/25] tests/boot-order: Make test independent of global_qtest, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 07/25] tests/endianesss: Make test independent of global_qtest, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 06/25] tests/Makefile: Use some more CONFIG switches for ppc tests, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 01/25] hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device, Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 13/25] hw/ide/ahci: Remove AllwinnerAHCIState from "qemu/typedefs.h", Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 16/25] hw/char/serial: Remove SerialState from "qemu/typedefs.h", Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 11/25] hw/pcmcia: Remove PCMCIACardState from "qemu/typedefs.h", Thomas Huth, 2019/01/14
- [Qemu-devel] [PULL 19/25] ui/console: Remove QemuDmaBuf from "qemu/typedefs.h", Thomas Huth, 2019/01/14