mbox series

[v2,0/3] Enable vhost-user to be used on BSD systems

Message ID 20220302180318.28893-1-slp@redhat.com (mailing list archive)
Headers show
Series Enable vhost-user to be used on BSD systems | expand

Message

Sergio Lopez March 2, 2022, 6:03 p.m. UTC
Since QEMU is already able to emulate ioeventfd using pipefd, we're already
pretty close to supporting vhost-user on non-Linux systems.

This two patches bridge the gap by:

1. Adding a new event_notifier_get_wfd() to return wfd on the places where
   the peer is expected to write to the notifier.

2. Modifying the build system to it allows enabling vhost-user on BSD.

v1->v2:
  - Drop: "Allow returning EventNotifier's wfd" (Alex Williamson)
  - Add: "event_notifier: add event_notifier_get_wfd()" (Alex Williamson)
  - Add: "vhost: use wfd on functions setting vring call fd"
  - Rename: "Allow building vhost-user in BSD" to "configure, meson: allow
    enabling vhost-user on all POSIX systems"
  - Instead of making possible enabling vhost-user on Linux and BSD systems,
    allow enabling it on all non-Windows platforms. (Paolo)

Sergio Lopez (3):
  event_notifier: add event_notifier_get_wfd()
  vhost: use wfd on functions setting vring call fd
  configure, meson: allow enabling vhost-user on all POSIX systems

 configure                     | 4 ++--
 hw/virtio/vhost.c             | 6 +++---
 include/qemu/event_notifier.h | 1 +
 meson.build                   | 2 +-
 util/event_notifier-posix.c   | 5 +++++
 5 files changed, 12 insertions(+), 6 deletions(-)

Comments

Stefan Hajnoczi March 3, 2022, 9:44 a.m. UTC | #1
On Wed, Mar 02, 2022 at 07:03:15PM +0100, Sergio Lopez wrote:
> Since QEMU is already able to emulate ioeventfd using pipefd, we're already
> pretty close to supporting vhost-user on non-Linux systems.
> 
> This two patches bridge the gap by:
> 
> 1. Adding a new event_notifier_get_wfd() to return wfd on the places where
>    the peer is expected to write to the notifier.
> 
> 2. Modifying the build system to it allows enabling vhost-user on BSD.

Please update the vhost-user protocol specification. It mentions eventfd
and there needs to be a note explaining how pipes are used instead on
non-Linux platforms.

Stefan