mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: introduce platform option to limit maximum IOMMU address width
Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
This commit is contained in:
committed by
Rob Bradford
parent
fa686fdfc7
commit
74ca38f7a9
@@ -88,12 +88,19 @@ pub fn default_platformconfig_num_pci_segments() -> u16 {
|
||||
DEFAULT_NUM_PCI_SEGMENTS
|
||||
}
|
||||
|
||||
pub const DEFAULT_IOMMU_ADDRESS_WIDTH_BITS: u8 = 64;
|
||||
pub fn default_platformconfig_iommu_address_width_bits() -> u8 {
|
||||
DEFAULT_IOMMU_ADDRESS_WIDTH_BITS
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct PlatformConfig {
|
||||
#[serde(default = "default_platformconfig_num_pci_segments")]
|
||||
pub num_pci_segments: u16,
|
||||
#[serde(default)]
|
||||
pub iommu_segments: Option<Vec<u16>>,
|
||||
#[serde(default = "default_platformconfig_iommu_address_width_bits")]
|
||||
pub iommu_address_width_bits: u8,
|
||||
#[serde(default)]
|
||||
pub serial_number: Option<String>,
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user