From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: virtio-dev@lists.oasis-open.org
Subject: Re: [virtio-dev] Backend libraries for VirtIO device emulation
Date: Fri, 6 Mar 2020 19:40:58 +0000 [thread overview]
Message-ID: <20200306194058.GN3033@work-vm> (raw)
In-Reply-To: <874kv15o4q.fsf@linaro.org>
* Alex Bennée (alex.bennee@linaro.org) wrote:
> Hi,
>
> So the context of my question is what sort of common software layer is
> required to implement a virtio backend entirely in userspace?
>
> Currently most virtio backends are embedded directly in various VMMs
> which emulate a number of devices as well as deal with handling devices
> that are vhost aware and link with the host kernel. However there seems
> to be a growing interest in having backends implemented in separate
> processes, potentially even hosted in other guest VMs.
>
> As far as I can tell there is a lot of duplicated effort in handling the
> low level navigation of virt queues and buffers. QEMU has code in
> hw/virtio as well as contrib/libvhost-user which is used by the recent
> virtiofsd daemon. kvm-tool has a virtio subdirectory that implements a
> similar set of functionality for it's emulation. The Rust-vmm project
> has libraries for implementing the device traits.
>
> Another aspect to this is the growing interest in carrying virtio over
> other hypervisors. I'm wondering if there is enough abstraction possible
> to have a common library that is hypervisor agnostic? Can a device
> backend be emulated purely with some shared memory and some sockets for
> passing messages/kicks from/to the VMM which then deals with the hypervisor
> specifics of the virtio-transport?
It's a little tricky because it has to interface tightly with the way
that the memory-mapping works for the hypervisor, so that the external
process can access the memory of the queues.
QEMU's vhost-user has a fair amount of code for handling the mappings,
dirty logging for migration, iommu's and things like reset (which is
pretty hairy, and probably needs more work).
Dave
> Thoughts?
>
> --
> Alex Bennée
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2020-03-06 19:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 18:33 [virtio-dev] Backend libraries for VirtIO device emulation Alex Bennée
2020-03-06 19:14 ` Matias Ezequiel Vara Larsen
2020-03-06 20:34 ` Alex Bennée
2020-03-06 19:40 ` Dr. David Alan Gilbert [this message]
2020-03-06 20:24 ` Alex Bennée
2020-03-09 8:11 ` Jan Kiszka
2020-03-09 10:44 ` Dr. David Alan Gilbert
2020-03-09 12:12 ` Alex Bennée
2020-03-09 15:08 ` Dr. David Alan Gilbert
2020-03-09 15:46 ` Stefan Hajnoczi
2020-03-09 16:43 ` Alex Bennée
2020-03-11 17:24 ` Stefan Hajnoczi
2020-03-11 18:18 ` Halil Pasic
2020-03-09 17:27 ` Srivatsa Vaddagiri
2020-03-09 17:42 ` Alex Bennée
2020-03-11 17:28 ` 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=20200306194058.GN3033@work-vm \
--to=dgilbert@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=virtio-dev@lists.oasis-open.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