backends/vhost-user: remove the ioeventfd check
PATCH v2 1/1 backends/vhost-user: remove the ioeventfd check
While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling.
With this change I can run:
$QEMU $OPTS \
-display gtk,gl=on \
-device vhost-user-gpu-pci,chardev=vhgpu \
-chardev socket,id=vhgpu,path=vhgpu.sockwith:
./contrib/vhost-user-gpu/vhost-user-gpu \
-s vhgpu.sock \
-vand at least see things start-up - although the display gets rotated by 180 degrees. Once lightdm takes over we never make it to the login prompt and just get a blank screen.
Message-Id: <[email protected]>
---
v2
- reword commit message to make it clear we simulate ioeventfd
- drop check altogether as we can fallback for KVM as well
--- backends/vhost-user.c | 11 ----------- 1 file changed, 11 deletions(-)
backends/vhost-user.c +0 -11
@@ -21,12 +21,6 @@#include "io/channel-command.h" #include "hw/virtio/virtio-bus.h" -static bool -ioeventfd_enabled (void ) -{ -return kvm_enabled () &&kvm_eventfds_enabled (); -} -int vhost_user_backend_dev_init (VhostUserBackend *b,VirtIODevice *vdev,unsigned nvqs,Error **errp)
@@ -35,11 +29,6 @@ vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev,assert (!b->vdev && vdev); -if (!ioeventfd_enabled ()) { -error_setg (errp,"vhost initialization failed: requires kvm" ); -return -1 ; - } -if (!vhost_user_init (&b->vhost_user, &b->chr, errp)) {return -1 ; }
Signature · 1 line
2.34.1
Quoted 26 lines · Alex Bennée
While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling.
With this change I can run:
$QEMU $OPTS \ -display gtk,gl=on \ -device vhost-user-gpu-pci,chardev=vhgpu \ -chardev socket,id=vhgpu,path=vhgpu.sockwith:
./contrib/vhost-user-gpu/vhost-user-gpu \ -s vhgpu.sock \ -vand at least see things start-up - although the display gets rotated by 180 degrees. Once lightdm takes over we never make it to the login prompt and just get a blank screen.
Signed-off-by Alex Bennée <[email protected]>Cc Gerd Hoffmann <[email protected]>Message-Id: <[email protected]>
Quoted 7 lines
---
v2
- reword commit message to make it clear we simulate ioeventfd
- drop check altogether as we can fallback for KVM as well--- backends/vhost-user.c | 11 ----------- 1 file changed, 11 deletions(-)
Nice!