mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-09-12 10:04:51 +00:00
vmm: Add optional PCI b/d/f to each DeviceNode
We need a way to store the information about where a PCI device was placed on the PCI bus before the VM was snapshotted. The way to do this is by adding an extra field to the DeviceNode structure. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
1e0ebb760f
commit
98dac352b8
@ -15,6 +15,8 @@ pub struct DeviceNode {
|
|||||||
pub children: Vec<String>,
|
pub children: Vec<String>,
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub migratable: Option<Arc<Mutex<dyn Migratable>>>,
|
pub migratable: Option<Arc<Mutex<dyn Migratable>>>,
|
||||||
|
#[cfg(feature = "pci_support")]
|
||||||
|
pub pci_bdf: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DeviceNode {
|
impl DeviceNode {
|
||||||
@ -25,6 +27,8 @@ impl DeviceNode {
|
|||||||
parent: None,
|
parent: None,
|
||||||
children: Vec::new(),
|
children: Vec::new(),
|
||||||
migratable,
|
migratable,
|
||||||
|
#[cfg(feature = "pci_support")]
|
||||||
|
pci_bdf: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user