firecracker-microvm / firecracker-microvm/firecracker

[Feature Request] Generic vhost-user

Open
#5,687 7 comments 0 reactions 0 assignees View on GitHub
Priority: Low Status: Parked
Dominant language
Rust
Stars
36.7k
Forks
2.6k
Avg merge
3d 2h
Merged PRs (30d)
53

Description

# Feature Request

Implement a _generic_ vhost-user frontend device. This is an alternative to #4266, which is specifically about vhost-user-blk.

## Describe the desired solution

It is possible to implement a vhost-user frontend that knows very little about the specific device being implemented. When compared to per-device-type frontends, a generic frontend reduces the amount of code needed and allows using device types that Firecracker would never support natively. The only requirement is that the backend is responsible for handling configuration space.

This opens up many additional use-cases for Firecracker without adding any additional complexity on the Firecracker side. As shown by cloud-hypervisor/cloud-hypervisor#7221, the generic vhost-user frontend is roughly the same size as the other frontends, but offers much more functionality. For instance, it can be used with [SPDK’s vhost-user-blk backend](https://github.com/spdk/spdk/blob/ff061805c7f6c21d3791915eb7b79bae92da6881/lib/vhost/vhost_blk.c) or with [virtiofsd](https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7221/changes#diff-e05b6403b248d29ff06031cd2f8bc176f1724bb1dd6b75b60d86014b9ddd677e).

## Describe possible alternatives

Implement separate frontends for each supported vhost-user device type. This needs more code and is less flexible.

## Additional context

I saw that #4266 was about implementing a vhost-user-blk frontend. As demonstrated by cloud-hypervisor/cloud-hypervisor#7221, a generic vhost-user frontend would support more device types, while possibly requiring less code.

## Checks

- [x] Have you searched the Firecracker Issues database for similar requests?
- [x] Have you read all the existing relevant Firecracker documentation?
- [x] Have you read and understood Firecracker's core tenets?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.