mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
04bc6b3ccc
commit
36a3369802
@@ -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 {
|
||||
|
||||
@@ -2729,7 +2729,6 @@ mod unit_tests {
|
||||
mode: ConsoleOutputMode::Null,
|
||||
socket: None,
|
||||
},
|
||||
iommu: false,
|
||||
},
|
||||
console: ConsoleConfig {
|
||||
common: CommonConsoleConfig {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user