From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com,
stefanha@redhat.com, mathieu.poirier@linaro.org,
viresh.kumar@linaro.org, sgarzare@redhat.com,
"Alex Bennée" <alex.bennee@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PATCH v2] backends/vhost-user: remove the ioeventfd check
Date: Mon, 30 Jan 2023 12:47:28 +0000 [thread overview]
Message-ID: <20230130124728.175610-1-alex.bennee@linaro.org> (raw)
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
next reply other threads:[~2023-01-30 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 12:47 Alex Bennée [this message]
2023-01-30 16:15 ` [PATCH v2] backends/vhost-user: remove the ioeventfd check Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230130124728.175610-1-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mathieu.poirier@linaro.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=slp@redhat.com \
--cc=stefanha@redhat.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).