[Rust-VMM] vhost-device outstanding tasks

Alex Bennée alex.bennee at linaro.org
Mon May 23 10:24:36 UTC 2022


This is one of several emails to follow up on Linaro's internal KWG
sprint last week in Cambridge where a number of Project Stratos hackers
discussed what next steps we have and started to think about future
work. I am splitting the update into several emails so I can freely CC
the relevant lists for each without too much cross-posting spam.


We've made good progress over the last year and have up-streamed a number
of device models as vhost-user daemons. We have also gotten our first
proof of concept build of the xen-vhost-master which has allowed us to
reuse these backends on the Xen hypervisor.

Outstanding work

vm-virtio definitions

Given our vhost-user daemons were not re-implementing existing virtio
device models a number of the queue handling definitions are in the
vhost-device repository itself. As discussed before now we have these
working we should migrate common definitions to the vm-virtio crate so
in-VMM virtio emulation can re-use this code.

Get outstanding vsock PR merged

We actually have two outstanding PR's against the vhost-device
repository which implement virtio-vsock and virtio-scsi. They were done
as GSoC projects but didn't get merged at the time due to lack of
review. They currently have outstanding requests for code changes but
due to the nature of GSoC it looks like the original authors don't have
time to make the changes which is understandable given changes the
repository has gone through over the last two years.

I'm agnostic about virtio-scsi but given the usefulness of virtio-vsock
it seems a shame to leave an implementation to wither on a branch.
There has been some work on vm-virtio to improve the queue handling and
with Andreea's help I have a branch that uses that. Should we just pick
up the branch and finish the pull request process?

Sort out an official vhost-master repository in rust-vmm

The rust-vmm project has the vhost-user-backend which implements the
core backend behaviour for handling vhost-user messages. There is also
an abstraction for vhost (user and kernel handling) from the VMM side in
the vhost repository. However it doesn't provide everything needed to
implement a full vhost-master. Currently Viresh is using:


is the xen-vhost-master project which is constructed from the in-VMM
vhost-master bits from Cloud Hypervisor. We should get this properly
up-streamed into the rust-vmm project.

Should this be merged into the existing rust-vmm/vhost repository or
does it require it's own repository?

Properly document and support cross-compilation

Currently most of our testing is on Arm systems and currently we are

  - hacking up the local repo for cross-compilation
  - doing a "native" build in an QEMU emulated Aarch64 system

the second option is potentially quite slow, at least for the first
build. Given building backends for non-x86 systems is core to Linaro's
goals we should properly support cross compilation for the vhost-device
repository and document it. This should be also be enabled in the CI to
ensure the configuration doesn't bitrot.

See Also

Other subjects discussed will be the subject of other emails today with
different distribution lists. These are:

  - Xen specific enabling work
  - Additional virtio devices
  - Integrating rust-vmm with QEMU

Happy reading ;-)

Alex Bennée

More information about the Rust-vmm mailing list