mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main, vmm: add explicit PCI BDF support for Rng device
This was missing in [0] but is required for proper explicit PCI BDF management, e.g., when a VM is created via libvirt and each device has an explicit BDF. [0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7965 On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
18bbc71b59
commit
bad10f3026
@@ -432,18 +432,20 @@ where
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct RngConfig {
|
||||
#[serde(flatten)]
|
||||
pub pci_common: PciDeviceCommonConfig,
|
||||
pub src: PathBuf,
|
||||
#[serde(default)]
|
||||
pub iommu: bool,
|
||||
}
|
||||
|
||||
pub const DEFAULT_RNG_SOURCE: &str = "/dev/urandom";
|
||||
impl RngConfig {
|
||||
pub const DEFAULT_RNG_SOURCE: &str = "/dev/urandom";
|
||||
}
|
||||
|
||||
impl Default for RngConfig {
|
||||
fn default() -> Self {
|
||||
RngConfig {
|
||||
src: PathBuf::from(DEFAULT_RNG_SOURCE),
|
||||
iommu: false,
|
||||
src: PathBuf::from(Self::DEFAULT_RNG_SOURCE),
|
||||
pci_common: PciDeviceCommonConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user