mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 07:21:15 +00:00
From a VirtioPciDevice perspective, there are two types of BARs, either the virtio configuration BAR or the SHaredMemory BAR. The SHaredMemory BAR address comes from the virtio device directly as the memory region had been previously allocated when the virtio device has been created. So for this BAR, there's nothing to do when restoring a VM, since the associated virtio device is already restored with the appropriate resources, hence the BAR will already be at the right address. The remaining configuration BAR is different, as we usually get its address from the SystemAllocator. This means in case we restore a VM, we must provide this value, bypassing the allocator. This is what this commit takes care of, by letting the caller set the base address for the configuration BAR prior to allocating the BARs. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |