mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: ivshmem device support
Signed-off-by: Yi Wang <foxywang@tencent.com> Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -29,6 +29,8 @@ use vmm::landlock::{Landlock, LandlockError};
|
||||
use vmm::vm_config;
|
||||
#[cfg(feature = "fw_cfg")]
|
||||
use vmm::vm_config::FwCfgConfig;
|
||||
#[cfg(feature = "ivshmem")]
|
||||
use vmm::vm_config::IvshmemConfig;
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use vmm::vm_config::SgxEpcConfig;
|
||||
use vmm::vm_config::{
|
||||
@@ -300,6 +302,12 @@ fn get_cli_options_sorted(
|
||||
.help("Path to initramfs image")
|
||||
.num_args(1)
|
||||
.group("vm-config"),
|
||||
#[cfg(feature = "ivshmem")]
|
||||
Arg::new("ivshmem")
|
||||
.long("ivshmem")
|
||||
.help(IvshmemConfig::SYNTAX)
|
||||
.num_args(1)
|
||||
.group("vm-config"),
|
||||
Arg::new("kernel")
|
||||
.long("kernel")
|
||||
.help(
|
||||
@@ -1034,6 +1042,8 @@ mod unit_tests {
|
||||
preserved_fds: None,
|
||||
landlock_enable: false,
|
||||
landlock_rules: None,
|
||||
#[cfg(feature = "ivshmem")]
|
||||
ivshmem: None,
|
||||
};
|
||||
|
||||
assert_eq!(expected_vm_config, result_vm_config);
|
||||
|
||||
Reference in New Issue
Block a user