OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Backend libraries for VirtIO device emulation


On Mon, Mar 09, 2020 at 04:43:31PM +0000, Alex Bennée wrote:
> 
> Stefan Hajnoczi <stefanha@redhat.com> writes:
> 
> > On Fri, Mar 06, 2020 at 06:33:57PM +0000, Alex Bennée wrote:
> >> So the context of my question is what sort of common software layer is
> >> required to implement a virtio backend entirely in userspace?
> >
> > Yes and no.
> >
> > vhost-user is currently the most widely-used (cross-VMM) interface for
> > out-of-process VIRTIO device emulation.
> >
> > However, it's not a library, just a protocol specification involving
> > UNIX domain sockets.  You mentioned the various implementations below:
> >
> <snip>
> >
> >> 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?
> >
> > Yes, that is what vhost-user does.
> 
> I thought so - but does any vhost-user implementation assume it has
> access to the entire of the guests memory space? I can see why that
> might be seen as undesirable from a security point of view.

VMMs typically give the vhost-user device program access to the entirety
of guest RAM.  That's because unmodified VIRTIO guest drivers typically
require access to all of guest memory.

If the guest software cooperates then it's possible to reduce the shared
memory region.  In other words, the vhost-user protocol doesn't demand
that guest RAM is shared, it just requires all addresses to be within
the shared memory region, whatever that may be.

> So aside from virtiofsd and crosvm's various pieces for crostini
> emulation what other out-of-VMM device emulation daemons are you aware
> of?

I haven't checked but my understanding was that crosvm uses its own
out-of-process device interface (not vhost-user).

The previously mentioned vhost-user ones were DPDK
(https://www.dpdk.org/) and SPDK (https://spdk.io/).

Sergio Lopez has implemented vhost-user-blk in Rust:
https://github.com/slp/qsd

I think Nutanix is also using vhost-user, but am not sure and I don't
know if that is open source.

There are probably more that I'm not aware of but a web search would
turn up.

Stefan

Attachment: signature.asc
Description: PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]