vmm: drop misleading iommu option from serial config

`--serial` still accepted `iommu=on|off` from the shared serial/console
configuration shape, even though only virtio-console has a meaningful
IOMMU connection.

Cloud Hypervisor wires virtio-iommu support through DMA-capable
virtio/VFIO PCI endpoints. The serial devices are legacy UARTs accessed
through PIO or MMIO registers, so exposing an IOMMU option there is
misleading.

On-behalf-of: Philipp Schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-05-11 16:10:29 +02:00
committed by Rob Bradford
parent 04bc6b3ccc
commit 36a3369802
5 changed files with 3 additions and 18 deletions

View File

@@ -1018,7 +1018,6 @@ mod unit_tests {
mode: ConsoleOutputMode::Null,
socket: None,
},
iommu: false,
},
console: ConsoleConfig {
common: CommonConsoleConfig {

View File

@@ -177,7 +177,6 @@ impl RequestHandler for StubApiRequestHandler {
mode: ConsoleOutputMode::Tty,
socket: None,
},
iommu: false,
},
console: ConsoleConfig {
common: CommonConsoleConfig {

View File

@@ -2207,18 +2207,11 @@ impl SerialConfig {
let mut parser = OptionParser::new();
parser
.add_all_valueless(CommonConsoleConfig::VALUELESS_OPTIONS)
.add_all(CommonConsoleConfig::VALUE_OPTIONS)
.add("iommu");
.add_all(CommonConsoleConfig::VALUE_OPTIONS);
parser.parse(serial).map_err(Error::ParseSerial)?;
let iommu = parser
.convert::<Toggle>("iommu")
.map_err(Error::ParsePciDeviceCommonConfig)?
.unwrap_or(Toggle(false))
.0;
let common = CommonConsoleConfig::parse(serial, Error::ParseSerial)?;
Ok(Self { common, iommu })
Ok(Self { common })
}
}
@@ -5054,7 +5047,6 @@ id=\"{id}\",pci_segment={pci_segment},queue_sizes={queue_sizes}"
mode: ConsoleOutputMode::Null,
socket: None,
},
iommu: false,
},
console: ConsoleConfig {
common: CommonConsoleConfig {

View File

@@ -2729,7 +2729,6 @@ mod unit_tests {
mode: ConsoleOutputMode::Null,
socket: None,
},
iommu: false,
},
console: ConsoleConfig {
common: CommonConsoleConfig {

View File

@@ -582,13 +582,10 @@ impl ApplyLandlock for CommonConsoleConfig {
pub struct SerialConfig {
#[serde(flatten)]
pub common: CommonConsoleConfig,
#[serde(default, skip_serializing_if = "<&bool as std::ops::Not>::not")]
pub iommu: bool,
}
impl SerialConfig {
pub const SYNTAX: &str =
"Control serial port: \"off|null|pty|tty|file=<path>|socket=<path>,iommu=on|off\"";
pub const SYNTAX: &str = "Control serial port: \"off|null|pty|tty|file=<path>|socket=<path>\"";
}
impl Default for SerialConfig {
@@ -599,7 +596,6 @@ impl Default for SerialConfig {
mode: ConsoleOutputMode::Null,
socket: None,
},
iommu: false,
}
}
}