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:
Sebastien Boeuf 2020-05-11 17:21:25 +02:00 committed by Rob Bradford
parent 1e0ebb760f
commit 98dac352b8

View File

@ -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,
}
}
}