mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +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>,
|
||||
#[serde(skip)]
|
||||
pub migratable: Option<Arc<Mutex<dyn Migratable>>>,
|
||||
#[cfg(feature = "pci_support")]
|
||||
pub pci_bdf: Option<u32>,
|
||||
}
|
||||
|
||||
impl DeviceNode {
|
||||
@ -25,6 +27,8 @@ impl DeviceNode {
|
||||
parent: None,
|
||||
children: Vec::new(),
|
||||
migratable,
|
||||
#[cfg(feature = "pci_support")]
|
||||
pci_bdf: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user