Hi Daniel,

thank you for looking into this. I checked how VHOST_USER_VSOCK and it
refers to the vhost-user protocol. It is implemented in the
subprojects/libvhost-user library, but this library depends on poll.h
and linux/vhost.h files. Do you know if it builds/works on Windows?

I checked how poll.h is used and the only reference I found is "VU_WATCH_IN
= POLLIN", no other VU_WATCH_* items seem to be used (the same applies to
G_IO_* in -glib.c). Maybe retire VU_WATCH_ and poll.h dependency?

For linux/vhost.h, I see it is gated by defined(__linux__)
in libvhost-user.c but not in libvhost-user.h and I think it is not used
in libvhost-user.

Regards,
Roman.


On Mon, Apr 15, 2024 at 4:20 AM Daniel P. Berrangé <berra...@redhat.com>
wrote:

> On Wed, Apr 03, 2024 at 02:30:33PM -0700, Roman Kiryanov wrote:
> > Hi Peter, Alex and QEMU,
> >
> > I work in Android Studio Emulator and we use virtio-vsock to emulate
> > devices (e.g. sensors) which live in the Emulator binary. We need to run
> on
> > Windows and in environments without CONFIG_VHOST_VSOCK, that is why we
> > cannot use vhost-vsock and invented our implementation. I tried to grep
> the
> > QEMU8 sources and I believe virtio-vsock is not available there.
> >
> > Do you think it is a good idea to implement virtio-vsock in QEMU (e.g. to
> > run on Windows)? If the answer is yes, could you please point where I
> could
> > start to build an upstreamable solution (not Android Emulator specific)?
> It
> > is not clear to me how we should make the device available for clients
> > (sensors, modem, adb, etc) in a generic way.
>
> This issue is proposing the idea of exposing VSOCK using AF_UNIX as the
> host backend, in a manner that's compatible with that used by firecracker
> and cloud-hypervisor:
>
>   https://gitlab.com/qemu-project/qemu/-/issues/2095
>
> Recent versions of Windows support AF_UNIX these days, so hopefully that
> would be satisfactory as an approach ?
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>

Reply via email to