* [PATCH v2] backends/vhost-user: remove the ioeventfd check
@ 2023-01-30 12:47 Alex Bennée
2023-01-30 16:15 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2023-01-30 12:47 UTC (permalink / raw)
To: qemu-devel
Cc: slp, mst, marcandre.lureau, stefanha, mathieu.poirier,
viresh.kumar, sgarzare, Alex Bennée, Gerd Hoffmann
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.sock
with:
./contrib/vhost-user-gpu/vhost-user-gpu \
-s vhgpu.sock \
-v
and 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 <alex.bennee@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20221202132231.1048669-1-alex.bennee@linaro.org>
---
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(-)
diff --git a/backends/vhost-user.c b/backends/vhost-user.c
index 7bfcaef976..7aae57f56c 100644
--- a/backends/vhost-user.c
+++ b/backends/vhost-user.c
@@ -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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] backends/vhost-user: remove the ioeventfd check
2023-01-30 12:47 [PATCH v2] backends/vhost-user: remove the ioeventfd check Alex Bennée
@ 2023-01-30 16:15 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2023-01-30 16:15 UTC (permalink / raw)
To: Alex Bennée
Cc: qemu-devel, slp, mst, marcandre.lureau, stefanha, mathieu.poirier,
viresh.kumar, sgarzare, Gerd Hoffmann
On Mon, 30 Jan 2023 at 07:48, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> 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.sock
>
> with:
>
> ./contrib/vhost-user-gpu/vhost-user-gpu \
> -s vhgpu.sock \
> -v
>
> and 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 <alex.bennee@linaro.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Message-Id: <20221202132231.1048669-1-alex.bennee@linaro.org>
>
> ---
> 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!
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-30 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-30 12:47 [PATCH v2] backends/vhost-user: remove the ioeventfd check Alex Bennée
2023-01-30 16:15 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).