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>
Subject: Re: [RFC PATCH for 8.0] backends/vhost-user: relax the ioeventfd check
Date: Mon, 19 Dec 2022 17:48:50 +0000 [thread overview]
Message-ID: <87v8m7i8s5.fsf@linaro.org> (raw)
In-Reply-To: <20221202132231.1048669-1-alex.bennee@linaro.org>
Alex Bennée <alex.bennee@linaro.org> writes:
> While you certainly need ioeventfds to work for KVM guests it
> shouldn't be limited to that. We can run vhost-user backends for TCG
> guests and either use ioeventfds or in band signalling.
>
> Maybe we should apply the same fix as b0aa77d36d (vhost-user: fix
> ioeventfd_enabled)?
>
> 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).
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> backends/vhost-user.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/backends/vhost-user.c b/backends/vhost-user.c
> index 5dedb2d987..87d43fb03a 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,8 +29,8 @@ vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev,
>
> assert(!b->vdev && vdev);
>
> - if (!ioeventfd_enabled()) {
> - error_setg(errp, "vhost initialization failed: requires kvm");
> + if (kvm_enabled() && !kvm_eventfds_enabled()) {
> + error_setg(errp, "vhost initialization failed: kvm required ioeventfds");
> return -1;
> }
Gentle ping?
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2022-12-19 17:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 13:22 [RFC PATCH for 8.0] backends/vhost-user: relax the ioeventfd check Alex Bennée
2022-12-19 17:48 ` Alex Bennée [this message]
2022-12-19 17:53 ` Michael S. Tsirkin
2022-12-19 18:49 ` 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=87v8m7i8s5.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--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).