vmm: config: Validate IOMMU configuration

Ensure devices that are specified to be on a PCI segment that is behind
the IOMMU are IOMMU enabled if possible or error out for those devices
that do not support it.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-03-18 16:33:08 +00:00
parent 6d2224f1ba
commit 0834eca8d4
2 changed files with 228 additions and 2 deletions

View File

@@ -2130,7 +2130,13 @@ mod parallel {
let (cmd_success, cmd_output) = remote_command_w_output(
&api_socket,
"add-disk",
Some(format!("path={},id=test0,pci_segment=1", test_disk_path.as_str()).as_str()),
Some(
format!(
"path={},id=test0,pci_segment=1,iommu=on",
test_disk_path.as_str()
)
.as_str(),
),
);
assert!(cmd_success);
assert!(String::from_utf8_lossy(&cmd_output)