vmm: generic vhost-user: add support

Add VMM support for generic vhost-user devices.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
Demi Marie Obenour
2026-02-04 09:52:42 -05:00
committed by Rob Bradford
parent 8c618ff5e0
commit 085a7a49fa
8 changed files with 515 additions and 8 deletions

View File

@@ -4,6 +4,7 @@
//
use std::collections::HashMap;
use std::fmt::{Display, Write};
use std::num::ParseIntError;
use std::str::FromStr;
@@ -240,6 +241,21 @@ impl FromStr for ByteSized {
pub struct IntegerList(pub Vec<u64>);
impl Display for IntegerList {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_char('[')?;
let mut iter = self.0.iter();
if let Some(first) = iter.next() {
first.fmt(f)?;
for i in iter {
f.write_char(',')?;
i.fmt(f)?;
}
}
f.write_char(']')
}
}
#[derive(Error, Debug)]
pub enum IntegerListParseError {
#[error("invalid value: {0}")]