diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index 3cbfd1689..b4af1018d 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -176,6 +176,9 @@ components: $ref: '#/components/schemas/VhostUserBlkConfig' vsock: $ref: '#/components/schemas/VsockConfig' + iommu: + type: boolean + default: false description: Virtual machine configuration CpuConfig: diff --git a/vmm/src/config.rs b/vmm/src/config.rs index c5c889fa0..119b7cd72 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -669,6 +669,8 @@ pub struct VmConfig { pub vhost_user_net: Option>, pub vhost_user_blk: Option>, pub vsock: Option>, + #[serde(default)] + pub iommu: bool, } impl VmConfig { @@ -677,6 +679,8 @@ impl VmConfig { } pub fn parse(vm_params: VmParams) -> Result { + let iommu = false; + let mut disks: Option> = None; if let Some(disk_list) = &vm_params.disks { let mut disk_config_list = Vec::new(); @@ -778,6 +782,7 @@ impl VmConfig { vhost_user_net, vhost_user_blk, vsock, + iommu, }) } }